@plurix/ecom-components 0.0.2-beta.0 → 0.0.2-beta.2

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 (57) hide show
  1. package/dist/assets/svgs/CloseIcon.d.ts +1 -0
  2. package/dist/assets/svgs/CloseIcon.js +37 -0
  3. package/dist/assets/svgs/DiscountIcon.d.ts +1 -0
  4. package/dist/assets/svgs/DiscountIcon.js +37 -0
  5. package/dist/assets/svgs/FacebookIcon.d.ts +1 -0
  6. package/dist/assets/svgs/FacebookIcon.js +22 -0
  7. package/dist/assets/svgs/InstagramIcon.d.ts +1 -0
  8. package/dist/assets/svgs/InstagramIcon.js +49 -0
  9. package/dist/main.d.ts +2 -3
  10. package/dist/main.js +6 -4
  11. package/dist/packages/CartClubAlert/CartClubAlert.d.ts +8 -0
  12. package/dist/packages/CartClubAlert/CartClubAlert.js +22 -0
  13. package/dist/packages/Onboarding/Onboarding.d.ts +10 -0
  14. package/dist/packages/Onboarding/Onboarding.js +47 -0
  15. package/dist/packages/Onboarding/components/Bullets.d.ts +5 -0
  16. package/dist/packages/Onboarding/components/Bullets.js +10 -0
  17. package/dist/packages/Onboarding/components/Content.d.ts +9 -0
  18. package/dist/packages/Onboarding/components/Content.js +30 -0
  19. package/dist/packages/Onboarding/components/Footer.d.ts +9 -0
  20. package/dist/packages/Onboarding/components/Footer.js +15 -0
  21. package/dist/packages/Onboarding/components/Header.d.ts +6 -0
  22. package/dist/packages/Onboarding/components/Header.js +11 -0
  23. package/dist/packages/Onboarding/components/SocialMedia.d.ts +10 -0
  24. package/dist/packages/Onboarding/components/SocialMedia.js +36 -0
  25. package/dist/packages/Onboarding/constants/tips.d.ts +11 -0
  26. package/dist/packages/Onboarding/constants/tips.js +36 -0
  27. package/dist/packages/Onboarding/test/Bullets.test.js +20 -0
  28. package/dist/packages/Onboarding/test/Content.test.js +52 -0
  29. package/dist/packages/Onboarding/test/Footer.test.js +60 -0
  30. package/dist/packages/Onboarding/test/Header.test.js +30 -0
  31. package/dist/packages/Onboarding/test/Onboarding.test.js +22 -0
  32. package/dist/packages/Onboarding/test/SocialMedia.test.js +39 -0
  33. package/dist/packages/Onboarding/tips/Tip1.d.ts +1 -0
  34. package/dist/packages/Onboarding/tips/Tip1.js +2130 -0
  35. package/dist/packages/Onboarding/tips/Tip2.d.ts +1 -0
  36. package/dist/packages/Onboarding/tips/Tip2.js +361 -0
  37. package/dist/packages/Onboarding/tips/Tip3.d.ts +1 -0
  38. package/dist/packages/Onboarding/tips/Tip3.js +350 -0
  39. package/dist/packages/Onboarding/tips/Tip4.d.ts +1 -0
  40. package/dist/packages/Onboarding/tips/Tip4.js +593 -0
  41. package/dist/packages/Onboarding/tips/Tip5.d.ts +1 -0
  42. package/dist/packages/Onboarding/tips/Tip5.js +1571 -0
  43. package/dist/styles/cart-club-alert.global.css +1 -0
  44. package/dist/styles/onboarding.global.css +1 -0
  45. package/dist/types/FixedLengthArray.d.ts +7 -0
  46. package/dist/types/FixedLengthArray.js +1 -0
  47. package/dist/vite-env.d.js +1 -0
  48. package/package.json +4 -1
  49. package/dist/assets/index.css +0 -3
  50. package/dist/assets/index2.css +0 -3
  51. package/dist/assets/index3.css +0 -3
  52. package/dist/components/Button/index.d.ts +0 -4
  53. package/dist/components/Button/index.js +0 -11
  54. package/dist/components/Input/index.d.ts +0 -4
  55. package/dist/components/Input/index.js +0 -11
  56. package/dist/components/Label/index.d.ts +0 -4
  57. package/dist/components/Label/index.js +0 -11
@@ -0,0 +1 @@
1
+ export declare const CloseIcon: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,37 @@
1
+ import { jsxs as r, jsx as o } from "react/jsx-runtime";
2
+ const e = () => /* @__PURE__ */ r(
3
+ "svg",
4
+ {
5
+ width: "24",
6
+ height: "24",
7
+ viewBox: "0 0 24 24",
8
+ fill: "none",
9
+ xmlns: "http://www.w3.org/2000/svg",
10
+ "data-testid": "close-icon",
11
+ children: [
12
+ /* @__PURE__ */ o(
13
+ "path",
14
+ {
15
+ d: "M18 6L6 18",
16
+ stroke: "var(--color-main)",
17
+ strokeWidth: "1.8",
18
+ strokeLinecap: "round",
19
+ strokeLinejoin: "round"
20
+ }
21
+ ),
22
+ /* @__PURE__ */ o(
23
+ "path",
24
+ {
25
+ d: "M6 6L18 18",
26
+ stroke: "var(--color-main)",
27
+ strokeWidth: "1.8",
28
+ strokeLinecap: "round",
29
+ strokeLinejoin: "round"
30
+ }
31
+ )
32
+ ]
33
+ }
34
+ );
35
+ export {
36
+ e as CloseIcon
37
+ };
@@ -0,0 +1 @@
1
+ export declare const DiscountIcon: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,37 @@
1
+ import { jsxs as L, jsx as C } from "react/jsx-runtime";
2
+ const i = () => /* @__PURE__ */ L(
3
+ "svg",
4
+ {
5
+ width: "32",
6
+ height: "32",
7
+ viewBox: "0 0 32 32",
8
+ fill: "none",
9
+ xmlns: "http://www.w3.org/2000/svg",
10
+ children: [
11
+ /* @__PURE__ */ C(
12
+ "path",
13
+ {
14
+ d: "M11.6601 14.6198C12.414 14.6198 13.0252 14.021 13.0252 13.2822C13.0252 12.5435 12.414 11.9446 11.6601 11.9446C10.9061 11.9446 10.2949 12.5435 10.2949 13.2822C10.2949 14.021 10.9061 14.6198 11.6601 14.6198Z",
15
+ fill: "var(--color-main)"
16
+ }
17
+ ),
18
+ /* @__PURE__ */ C(
19
+ "path",
20
+ {
21
+ d: "M20.3329 20.049C21.0869 20.049 21.6981 19.4502 21.6981 18.7114C21.6981 17.9727 21.0869 17.3738 20.3329 17.3738C19.579 17.3738 18.9678 17.9727 18.9678 18.7114C18.9678 19.4502 19.579 20.049 20.3329 20.049Z",
22
+ fill: "var(--color-main)"
23
+ }
24
+ ),
25
+ /* @__PURE__ */ C(
26
+ "path",
27
+ {
28
+ d: "M31.5889 17.7671L31.0937 17.1049C30.5583 16.3836 30.5449 15.4066 31.0736 14.6722L31.5554 14.0034C32.2915 12.9805 31.9502 11.5576 30.8193 10.9609L30.0832 10.5741C29.2802 10.1544 28.8385 9.27578 28.9924 8.39058L29.1329 7.58407C29.3471 6.35135 28.4035 5.21042 27.1254 5.15797L26.2889 5.12518C25.3788 5.08584 24.5891 4.4826 24.3348 3.62363L24.1006 2.83678C23.7459 1.63029 22.3942 1.00738 21.2164 1.50571L20.4468 1.827C19.6103 2.18108 18.6333 1.97126 18.0243 1.30244L17.4689 0.692639C16.619 -0.238458 15.1267 -0.231901 14.2835 0.718867L13.7348 1.33523C13.1325 2.0106 12.1622 2.23354 11.319 1.89257L10.5427 1.57784C9.35825 1.09917 8.01986 1.74832 7.67857 2.95481L7.45774 3.74821C7.21683 4.61374 6.44056 5.2301 5.53046 5.27599L4.69397 5.32189C3.4158 5.39402 2.49232 6.54806 2.72653 7.78078L2.88045 8.58729C3.04775 9.46593 2.61946 10.3511 1.82312 10.7839L1.0937 11.1839C-0.0238534 11.7937 -0.345067 13.2231 0.411123 14.2329L0.906326 14.8951C1.44168 15.6164 1.45507 16.5934 0.926402 17.3278L0.444583 17.9966C-0.291531 19.0195 0.049758 20.4424 1.1807 21.0391L1.91681 21.4259C2.71984 21.8456 3.16151 22.7242 3.0076 23.6094L2.86707 24.4159C2.65292 25.6487 3.59649 26.7896 4.87465 26.842L5.71114 26.8748C6.62124 26.9142 7.41089 27.5174 7.66519 28.3764L7.89941 29.1632C8.25408 30.3697 9.60585 30.9926 10.7836 30.4943L11.5532 30.173C12.3897 29.8189 13.3667 30.0287 13.9757 30.6976L14.5311 31.3074C15.3877 32.2385 16.88 32.2319 17.7165 31.2811L18.2652 30.6648C18.8675 29.9894 19.8378 29.7665 20.681 30.1074L21.4573 30.4222C22.6418 30.9008 23.9801 30.2517 24.3214 29.0452L24.5423 28.2518C24.7832 27.3863 25.5594 26.7699 26.4695 26.724L27.306 26.6781C28.5842 26.606 29.5077 25.4519 29.2735 24.2192L29.1196 23.4127C28.9523 22.5341 29.3805 21.6489 30.1769 21.2161L30.9063 20.8161C32.0239 20.2129 32.3451 18.7835 31.5889 17.7671ZM8.36115 13.2821C8.36115 11.4986 9.83338 10.0561 11.6536 10.0561C13.4738 10.0561 14.946 11.4986 14.946 13.2821C14.946 15.0656 13.4738 16.5082 11.6536 16.5082C9.83338 16.5082 8.36115 15.0591 8.36115 13.2821ZM12.2893 21.603C12.0083 21.9374 11.4997 21.9833 11.1584 21.7079C10.8171 21.4325 10.7702 20.9342 11.0513 20.5997L19.6906 10.4036C19.9717 10.0692 20.4803 10.0233 20.8215 10.2987C21.1628 10.5741 21.2097 11.0724 20.9286 11.4068L12.2893 21.603ZM20.333 21.9374C18.5128 21.9374 17.0406 20.4948 17.0406 18.7113C17.0406 16.9278 18.5128 15.4853 20.333 15.4853C22.1532 15.4853 23.6255 16.9278 23.6255 18.7113C23.6255 20.4948 22.1532 21.9374 20.333 21.9374Z",
29
+ fill: "var(--color-main)"
30
+ }
31
+ )
32
+ ]
33
+ }
34
+ );
35
+ export {
36
+ i as DiscountIcon
37
+ };
@@ -0,0 +1 @@
1
+ export declare const FacebookIcon: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,22 @@
1
+ import { jsx as C } from "react/jsx-runtime";
2
+ const t = () => /* @__PURE__ */ C(
3
+ "svg",
4
+ {
5
+ width: "32",
6
+ height: "32",
7
+ viewBox: "0 0 32 32",
8
+ fill: "none",
9
+ xmlns: "http://www.w3.org/2000/svg",
10
+ "data-testid": "facebook-icon",
11
+ children: /* @__PURE__ */ C(
12
+ "path",
13
+ {
14
+ d: "M28.0595 32H21.9913C22.0015 31.8664 22.0211 31.7328 22.0211 31.5985C22.0211 28.2036 22.0195 24.8087 22.0164 21.4138C22.0164 21.1115 22.1033 21.0185 22.4081 21.0232C23.1689 21.0427 23.9305 21.0232 24.6905 21.0357C24.949 21.042 25.0783 20.9576 25.1747 20.717C25.7521 19.2445 26.346 17.7783 26.9336 16.3089C26.9704 16.216 26.9939 16.1176 27.0394 15.9691H22.3384C22.1746 15.9691 22.0203 15.9785 22.0211 15.7403C22.025 14.5318 22.0015 13.3234 22.0328 12.1165C22.0532 11.3502 22.2624 11.1432 23.0326 11.0877C23.769 11.0346 24.5095 11.0463 25.2483 11.0315C25.4951 11.0268 25.7419 11.0315 26.0052 11.0315V5.97037H25.6189C24.3888 5.97037 23.1587 5.97037 21.9286 5.97037C21.6377 5.9727 21.3473 5.99304 21.0589 6.03129C18.2383 6.39843 15.9607 8.98562 15.9552 11.8275C15.9552 13.0664 15.9552 14.3055 15.9552 15.545C15.9552 15.966 15.9552 15.9668 15.5196 15.9668C14.4567 15.9668 13.3932 15.9668 12.3292 15.9668C12.2101 15.9668 12.0903 15.977 11.9813 15.9816V21.0271H12.3833C13.4363 21.0271 14.4891 21.0271 15.5416 21.0271C15.9552 21.0271 15.9552 21.0271 15.9552 21.4396C15.9552 24.8246 15.9552 28.2096 15.9552 31.5946C15.9552 31.7289 15.9748 31.8625 15.985 31.9961H3.91211C3.81495 31.9672 3.71857 31.9359 3.62063 31.9102C3.18031 31.7946 2.70709 31.7477 2.30594 31.5532C0.700553 30.7759 0.00479752 29.4222 0.00401402 27.6841C-0.000686965 20.1642 -0.000686965 12.6443 0.00401402 5.12437C0.00401402 4.64709 0.0243796 4.16824 0.0572865 3.69096C0.115969 2.84413 0.450652 2.03962 1.01034 1.39996C1.57002 0.760295 2.32404 0.320534 3.15759 0.147639C3.40831 0.0960832 3.66061 0.0492127 3.91211 0H28.0595C28.1535 0.0377382 28.2512 0.0657422 28.351 0.0835793C30.0339 0.208564 31.5061 1.49747 31.8485 3.1543C31.9025 3.41443 31.9503 3.67611 32.0005 3.93546V28.0575C31.9624 28.1514 31.9346 28.2491 31.9174 28.3489C31.7921 30.0299 30.5017 31.5008 28.843 31.843C28.5844 31.9024 28.3204 31.95 28.0595 32Z",
15
+ fill: "#4864AE"
16
+ }
17
+ )
18
+ }
19
+ );
20
+ export {
21
+ t as FacebookIcon
22
+ };
@@ -0,0 +1 @@
1
+ export declare const InstagramIcon: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,49 @@
1
+ import { jsxs as t, jsx as C } from "react/jsx-runtime";
2
+ const l = () => /* @__PURE__ */ t(
3
+ "svg",
4
+ {
5
+ width: "32",
6
+ height: "32",
7
+ viewBox: "0 0 32 32",
8
+ fill: "none",
9
+ xmlns: "http://www.w3.org/2000/svg",
10
+ "data-testid": "instagram-icon",
11
+ children: [
12
+ /* @__PURE__ */ t("g", { clipPath: "url(#clip0_46032_17319)", children: [
13
+ /* @__PURE__ */ C(
14
+ "path",
15
+ {
16
+ d: "M16.0005 2.88243C20.2729 2.88243 20.7785 2.89894 22.466 2.97579C24.0259 3.04693 24.8731 3.30733 25.4371 3.52645C26.1329 3.78265 26.7623 4.19177 27.279 4.72365C27.8108 5.24027 28.22 5.8697 28.4762 6.56551C28.6953 7.1295 28.9557 7.97675 29.0268 9.53661C29.1037 11.2241 29.1202 11.7297 29.1202 16.0022C29.1202 20.2746 29.1037 20.7802 29.0268 22.4677C28.9557 24.0276 28.6953 24.8748 28.4762 25.4388C28.2097 26.1287 27.8019 26.7552 27.279 27.2781C26.756 27.8011 26.1295 28.2089 25.4397 28.4753C24.8757 28.6944 24.0284 28.9548 22.4686 29.026C20.7817 29.1028 20.2755 29.1193 16.003 29.1193C11.7306 29.1193 11.2244 29.1028 9.53748 29.026C7.97762 28.9548 7.13036 28.6944 6.56638 28.4753C5.87057 28.2191 5.24114 27.81 4.72452 27.2781C4.19265 26.7615 3.78352 26.1321 3.52732 25.4363C3.3082 24.8723 3.0478 24.025 2.97667 22.4652C2.89982 20.7776 2.88331 20.2721 2.88331 15.9996C2.88331 11.7271 2.89982 11.2216 2.97667 9.53407C3.0478 7.97421 3.3082 7.12695 3.52732 6.56297C3.78352 5.86716 4.19265 5.23773 4.72452 4.72111C5.24114 4.18923 5.87057 3.78011 6.56638 3.52391C7.13036 3.30479 7.97762 3.04439 9.53748 2.97325C11.225 2.8964 11.7306 2.87989 16.003 2.87989L16.0005 2.88243ZM16.003 -0.00292969C11.6575 -0.00292969 11.1126 0.0154889 9.406 0.0936089C7.69943 0.171729 6.53716 0.444196 5.52097 0.839243C4.45307 1.24124 3.48557 1.87107 2.68578 2.68491C1.87194 3.4847 1.24212 4.4522 0.840119 5.52009C0.445073 6.53629 0.174512 7.70111 0.0970268 9.40387C0.0195419 11.1066 0.000488281 11.6541 0.000488281 15.9996C0.000488281 20.3451 0.0189068 20.8901 0.0970268 22.5966C0.175147 24.3032 0.445073 25.4629 0.840119 26.4791C1.24228 27.5466 1.8721 28.5136 2.68578 29.3131C3.4853 30.1274 4.45286 30.7575 5.52097 31.1594C6.53716 31.555 7.70197 31.8256 9.40473 31.9031C11.1075 31.9806 11.6562 31.9996 16.0017 31.9996C20.3472 31.9996 20.8922 31.9812 22.5988 31.9031C24.3053 31.825 25.4638 31.555 26.48 31.1594C27.5432 30.7485 28.5088 30.12 29.3148 29.314C30.1208 28.508 30.7494 27.5424 31.1602 26.4791C31.5559 25.4629 31.8264 24.2981 31.9039 22.5954C31.9814 20.8926 32.0005 20.3439 32.0005 15.9983C32.0005 11.6528 31.982 11.1079 31.9039 9.40133C31.8258 7.69475 31.5559 6.53629 31.1602 5.52009C30.7585 4.45256 30.1289 3.48546 29.3152 2.68618C28.5155 1.87188 27.548 1.24161 26.48 0.839243C25.4638 0.444196 24.299 0.173634 22.5962 0.0961494C20.8935 0.0186645 20.346 -0.0003892 16.0005 -0.0003892L16.003 -0.00292969Z",
17
+ fill: "#E02D69"
18
+ }
19
+ ),
20
+ /* @__PURE__ */ C(
21
+ "path",
22
+ {
23
+ d: "M16.0006 7.78418C14.3757 7.78418 12.7872 8.26604 11.4361 9.16882C10.085 10.0716 9.03192 11.3548 8.41007 12.856C7.78823 14.3573 7.62552 16.0092 7.94254 17.603C8.25955 19.1967 9.04205 20.6607 10.1911 21.8097C11.3401 22.9587 12.804 23.7412 14.3978 24.0582C15.9915 24.3752 17.6435 24.2125 19.1447 23.5907C20.646 22.9688 21.9291 21.9158 22.8319 20.5647C23.7347 19.2135 24.2166 17.6251 24.2166 16.0001C24.2166 14.9212 24.0042 13.8528 23.5913 12.8559C23.1785 11.8591 22.5733 10.9533 21.8103 10.1904C21.0474 9.42745 20.1417 8.82227 19.1448 8.40941C18.148 7.99655 17.0796 7.7841 16.0006 7.78418ZM16.0006 21.3351C14.9454 21.3351 13.914 21.0223 13.0366 20.436C12.1593 19.8498 11.4755 19.0166 11.0717 18.0417C10.6679 17.0669 10.5622 15.9942 10.7681 14.9593C10.974 13.9244 11.4821 12.9738 12.2282 12.2277C12.9743 11.4816 13.9249 10.9735 14.9598 10.7676C15.9947 10.5618 17.0674 10.6674 18.0422 11.0712C19.0171 11.475 19.8503 12.1588 20.4365 13.0361C21.0227 13.9135 21.3356 14.945 21.3356 16.0001C21.3356 17.4151 20.7736 18.772 19.773 19.7726C18.7725 20.7731 17.4156 21.3351 16.0006 21.3351Z",
24
+ fill: "#E02D69"
25
+ }
26
+ ),
27
+ /* @__PURE__ */ C(
28
+ "path",
29
+ {
30
+ d: "M24.5416 9.37901C25.6019 9.37901 26.4615 8.51941 26.4615 7.45904C26.4615 6.39866 25.6019 5.53906 24.5416 5.53906C23.4812 5.53906 22.6216 6.39866 22.6216 7.45904C22.6216 8.51941 23.4812 9.37901 24.5416 9.37901Z",
31
+ fill: "#E02D69"
32
+ }
33
+ )
34
+ ] }),
35
+ /* @__PURE__ */ C("defs", { children: /* @__PURE__ */ C("clipPath", { id: "clip0_46032_17319", children: /* @__PURE__ */ C(
36
+ "rect",
37
+ {
38
+ width: "32",
39
+ height: "32",
40
+ fill: "white",
41
+ transform: "translate(0.000488281)"
42
+ }
43
+ ) }) })
44
+ ]
45
+ }
46
+ );
47
+ export {
48
+ l as InstagramIcon
49
+ };
package/dist/main.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- export { Button } from './components/Button'
2
- export { Input } from './components/Input'
3
- export { Label } from './components/Label'
1
+ export { CartClubAlert } from './packages/CartClubAlert/CartClubAlert';
2
+ export { Onboarding } from './packages/Onboarding/Onboarding';
package/dist/main.js CHANGED
@@ -1,4 +1,6 @@
1
- import { Button as t } from './components/Button/index.js'
2
- import { Input as p } from './components/Input/index.js'
3
- import { Label as m } from './components/Label/index.js'
4
- export { t as Button, p as Input, m as Label }
1
+ import { CartClubAlert as t } from "./packages/CartClubAlert/CartClubAlert.js";
2
+ import { Onboarding as a } from "./packages/Onboarding/Onboarding.js";
3
+ export {
4
+ t as CartClubAlert,
5
+ a as Onboarding
6
+ };
@@ -0,0 +1,8 @@
1
+
2
+ interface CartClubAlertProps {
3
+ discount: string;
4
+ participeLink: string;
5
+ learnMoreLink: string;
6
+ }
7
+ export declare const CartClubAlert: ({ discount, participeLink, learnMoreLink }: CartClubAlertProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,22 @@
1
+ import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
+ import { DiscountIcon as l } from "../../assets/svgs/DiscountIcon.js";
3
+ /* empty css */const d = ({
4
+ discount: a,
5
+ participeLink: c,
6
+ learnMoreLink: o
7
+ }) => /* @__PURE__ */ r("div", { className: "club-cart-alert-container", children: [
8
+ /* @__PURE__ */ r("header", { children: [
9
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(l, {}) }),
10
+ /* @__PURE__ */ e("p", { className: "club-infos-container", children: "Produtos do seu carrinho estão em promoção no Clube de Fidelidade" })
11
+ ] }),
12
+ /* @__PURE__ */ r("p", { className: "club-alert-ad", children: [
13
+ "Tenha ",
14
+ /* @__PURE__ */ e("strong", { children: a }),
15
+ " de desconto"
16
+ ] }),
17
+ /* @__PURE__ */ e("a", { className: "club-accept", href: c, children: "Me cadastrar" }),
18
+ /* @__PURE__ */ e("a", { className: "club-more-infos", href: o, children: "Saber Mais" })
19
+ ] });
20
+ export {
21
+ d as CartClubAlert
22
+ };
@@ -0,0 +1,10 @@
1
+ import { SocialMediaLinks } from './components/SocialMedia';
2
+
3
+ interface OnboardingProps {
4
+ socialMediaLinks?: SocialMediaLinks;
5
+ handleCloseAction: () => void;
6
+ handleFinishAction?: () => void;
7
+ genericTaggingEvent?: (name: string, params: object) => void;
8
+ }
9
+ export declare const Onboarding: ({ socialMediaLinks, handleCloseAction, handleFinishAction, genericTaggingEvent }: OnboardingProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,47 @@
1
+ import { jsxs as i, jsx as p } from "react/jsx-runtime";
2
+ import { useState as d } from "react";
3
+ import { Header as x } from "./components/Header.js";
4
+ import { Content as S } from "./components/Content.js";
5
+ import { Footer as c } from "./components/Footer.js";
6
+ import { TIPS_LENGTH as h } from "./constants/tips.js";
7
+ /* empty css */const w = ({
8
+ socialMediaLinks: a,
9
+ handleCloseAction: r,
10
+ handleFinishAction: n,
11
+ genericTaggingEvent: s
12
+ }) => {
13
+ const [t, m] = d(1), e = (o) => {
14
+ s == null || s("ofertas_pelo_whatsapp", {
15
+ clickText: o,
16
+ name: t
17
+ });
18
+ };
19
+ return /* @__PURE__ */ i("div", { className: "onboarding-container", children: [
20
+ /* @__PURE__ */ p(x, { sendEvent: e, handleCloseAction: r }),
21
+ /* @__PURE__ */ p(
22
+ S,
23
+ {
24
+ step: t,
25
+ sendEvent: e,
26
+ socialMediaLinks: a
27
+ }
28
+ ),
29
+ /* @__PURE__ */ p(
30
+ c,
31
+ {
32
+ step: t,
33
+ handleBackStep: (o) => {
34
+ e(o.target.innerText), t > 1 ? m(t - 1) : r();
35
+ },
36
+ handleNextStep: (o) => {
37
+ e(o.target.innerText);
38
+ const f = n ?? r;
39
+ t < h ? m(t + 1) : f();
40
+ }
41
+ }
42
+ )
43
+ ] });
44
+ };
45
+ export {
46
+ w as Onboarding
47
+ };
@@ -0,0 +1,5 @@
1
+ interface BulletsProps {
2
+ step: number;
3
+ }
4
+ export declare const Bullets: ({ step }: BulletsProps) => import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,10 @@
1
+ import { jsxs as r, jsx as t } from "react/jsx-runtime";
2
+ import { TIPS_LENGTH as l } from "../constants/tips.js";
3
+ const o = ({ step: i }) => /* @__PURE__ */ r("div", { className: "bullets-container", children: [
4
+ /* @__PURE__ */ t(e, { isActive: i === 1 }),
5
+ /* @__PURE__ */ t(e, { isActive: i > 1 && i < l }),
6
+ /* @__PURE__ */ t(e, { isActive: i === l })
7
+ ] }), e = ({ isActive: i }) => /* @__PURE__ */ t("div", { className: `bullet ${i ? "active" : ""}` });
8
+ export {
9
+ o as Bullets
10
+ };
@@ -0,0 +1,9 @@
1
+ import { SocialMediaLinks } from './SocialMedia';
2
+
3
+ interface ContentProps {
4
+ step: number;
5
+ socialMediaLinks?: SocialMediaLinks;
6
+ sendEvent: (clickText: string) => void;
7
+ }
8
+ export declare const Content: ({ step, socialMediaLinks, sendEvent }: ContentProps) => import("react/jsx-runtime").JSX.Element | null;
9
+ export {};
@@ -0,0 +1,30 @@
1
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
+ import { SocialMedia as o } from "./SocialMedia.js";
3
+ import { TIPS as c, TIPS_LENGTH as r } from "../constants/tips.js";
4
+ const p = ({
5
+ step: i,
6
+ socialMediaLinks: t,
7
+ sendEvent: a
8
+ }) => {
9
+ const s = c[i - 1];
10
+ return s ? /* @__PURE__ */ n("div", { className: "onboarding-content-container", children: [
11
+ /* @__PURE__ */ e("div", { className: "svg-container", children: s.svg() }),
12
+ s.isIllustration && /* @__PURE__ */ e("p", { className: "illustration-message", children: "Imagem Ilustrativa" }),
13
+ /* @__PURE__ */ n("p", { className: "steps-count", children: [
14
+ i,
15
+ " de ",
16
+ r
17
+ ] }),
18
+ /* @__PURE__ */ e("p", { className: "tip-message", children: s.tip }),
19
+ i === r && /* @__PURE__ */ e(
20
+ o,
21
+ {
22
+ socialMediaLinks: t,
23
+ sendEvent: a
24
+ }
25
+ )
26
+ ] }) : null;
27
+ };
28
+ export {
29
+ p as Content
30
+ };
@@ -0,0 +1,9 @@
1
+ import { MouseEvent } from 'react';
2
+
3
+ interface FooterProps {
4
+ step: number;
5
+ handleBackStep: (e: MouseEvent<HTMLButtonElement>) => void;
6
+ handleNextStep: (e: MouseEvent<HTMLButtonElement>) => void;
7
+ }
8
+ export declare const Footer: ({ step, handleBackStep, handleNextStep }: FooterProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,15 @@
1
+ import { jsxs as e, jsx as o } from "react/jsx-runtime";
2
+ import { Bullets as i } from "./Bullets.js";
3
+ import { TIPS_LENGTH as l } from "../constants/tips.js";
4
+ const a = ({
5
+ step: t,
6
+ handleBackStep: r,
7
+ handleNextStep: n
8
+ }) => /* @__PURE__ */ e("footer", { children: [
9
+ /* @__PURE__ */ o("button", { onClick: r, className: "back-button", children: "Voltar" }),
10
+ /* @__PURE__ */ o(i, { step: t }),
11
+ /* @__PURE__ */ o("button", { onClick: n, className: "confirm-button", children: t === l ? "Legal, Entendi" : "Próximo" })
12
+ ] });
13
+ export {
14
+ a as Footer
15
+ };
@@ -0,0 +1,6 @@
1
+ interface HeaderProps {
2
+ sendEvent: (clickText: string) => void;
3
+ handleCloseAction: () => void;
4
+ }
5
+ export declare const Header: ({ sendEvent, handleCloseAction }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,11 @@
1
+ import { jsxs as r, jsx as o } from "react/jsx-runtime";
2
+ import { CloseIcon as l } from "../../../assets/svgs/CloseIcon.js";
3
+ const i = ({ sendEvent: e, handleCloseAction: n }) => /* @__PURE__ */ r("header", { children: [
4
+ /* @__PURE__ */ o("h2", { children: "Experiência Personalizada" }),
5
+ /* @__PURE__ */ o("button", { onClick: () => {
6
+ e("Fechou o modal no X"), n();
7
+ }, children: /* @__PURE__ */ o(l, {}) })
8
+ ] });
9
+ export {
10
+ i as Header
11
+ };
@@ -0,0 +1,10 @@
1
+ interface SocialMediaProps {
2
+ socialMediaLinks?: SocialMediaLinks;
3
+ sendEvent: (clickText: string) => void;
4
+ }
5
+ export interface SocialMediaLinks {
6
+ facebook?: string;
7
+ instagram?: string;
8
+ }
9
+ export declare const SocialMedia: ({ socialMediaLinks, sendEvent }: SocialMediaProps) => import("react/jsx-runtime").JSX.Element | null;
10
+ export {};
@@ -0,0 +1,36 @@
1
+ import { jsxs as c, jsx as r } from "react/jsx-runtime";
2
+ import { FacebookIcon as t } from "../../../assets/svgs/FacebookIcon.js";
3
+ import { InstagramIcon as i } from "../../../assets/svgs/InstagramIcon.js";
4
+ const s = ({
5
+ socialMediaLinks: o,
6
+ sendEvent: e
7
+ }) => {
8
+ if (!o)
9
+ return null;
10
+ const { facebook: n, instagram: a } = o;
11
+ return /* @__PURE__ */ c("div", { className: "social-media-container", children: [
12
+ n && /* @__PURE__ */ r(
13
+ "a",
14
+ {
15
+ href: n,
16
+ target: "_blank",
17
+ rel: "noopener noreferrer",
18
+ onClick: () => e("facebook"),
19
+ children: /* @__PURE__ */ r(t, {})
20
+ }
21
+ ),
22
+ a && /* @__PURE__ */ r(
23
+ "a",
24
+ {
25
+ href: a,
26
+ target: "_blank",
27
+ rel: "noopener noreferrer",
28
+ onClick: () => e("instagram"),
29
+ children: /* @__PURE__ */ r(i, {})
30
+ }
31
+ )
32
+ ] });
33
+ };
34
+ export {
35
+ s as SocialMedia
36
+ };
@@ -0,0 +1,11 @@
1
+ import { FixedLengthArray } from '../../../types/FixedLengthArray';
2
+
3
+ type Tips = FixedLengthArray<Tip, typeof TIPS_LENGTH>;
4
+ interface Tip {
5
+ svg: () => React.ReactNode;
6
+ isIllustration: boolean;
7
+ tip: string;
8
+ }
9
+ export declare const TIPS_LENGTH = 5;
10
+ export declare const TIPS: Tips;
11
+ export {};
@@ -0,0 +1,36 @@
1
+ import { Tip1 as o } from "../tips/Tip1.js";
2
+ import { Tip2 as e } from "../tips/Tip2.js";
3
+ import { Tip3 as i } from "../tips/Tip3.js";
4
+ import { Tip4 as a } from "../tips/Tip4.js";
5
+ import { Tip5 as s } from "../tips/Tip5.js";
6
+ const p = 5, u = [
7
+ {
8
+ svg: o,
9
+ isIllustration: !1,
10
+ tip: "O site e aplicativo vai ficando com a sua cara conforme você vai comprando, assim você tem uma experiência de acordo com seu padrão de compra"
11
+ },
12
+ {
13
+ svg: e,
14
+ isIllustration: !0,
15
+ tip: "Veja produtos que você comprou anteriormente e adicione eles ao seu carrinho, fazendo suas compras com mais rapidez"
16
+ },
17
+ {
18
+ svg: i,
19
+ isIllustration: !0,
20
+ tip: "Você também consegue consegue repetir um pedido adicionando ele inteiro ao seu carrinho, onde você pode aumentar ou diminuir a quantidade dos produtos"
21
+ },
22
+ {
23
+ svg: a,
24
+ isIllustration: !0,
25
+ tip: "Você terá acesso aos corredores que você mais compra logo na tela inicial, assim você consegue conferir melhor a variedade dos produtos que você mais leva"
26
+ },
27
+ {
28
+ svg: s,
29
+ isIllustration: !1,
30
+ tip: "Siga nossas redes sociais! Estamos sempre melhorando sua experiencia em nossas Lojas, Site e Aplicativo!"
31
+ }
32
+ ];
33
+ export {
34
+ u as TIPS,
35
+ p as TIPS_LENGTH
36
+ };
@@ -0,0 +1,20 @@
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import { render as s } from "@testing-library/react";
3
+ import "@testing-library/jest-dom";
4
+ import { Bullets as o } from "../components/Bullets.js";
5
+ jest.mock("../constants/tips", () => ({ TIPS_LENGTH: 3 }));
6
+ describe("Bullets component tests", () => {
7
+ it("renders correctly amount of bullets", () => {
8
+ const { container: t } = s(/* @__PURE__ */ l(o, { step: 1 })), e = t.querySelectorAll(".bullet");
9
+ expect(e.length).toBe(3);
10
+ }), it("should first bullet active if step is 1", () => {
11
+ const { container: t } = s(/* @__PURE__ */ l(o, { step: 1 })), e = t.querySelector(".bullet");
12
+ expect(e).toHaveClass("active");
13
+ }), it("should middle bullet active if step is greater than 1 and less than TIPS_LENGTH", () => {
14
+ const { container: t } = s(/* @__PURE__ */ l(o, { step: 2 })), e = t.querySelector(".bullet:nth-child(2)");
15
+ expect(e).toHaveClass("active");
16
+ }), it("should last bullet active if step is equal than TIPS_LENGTH", () => {
17
+ const { container: t } = s(/* @__PURE__ */ l(o, { step: 3 })), e = t.querySelector(".bullet:last-child");
18
+ expect(e).toHaveClass("active");
19
+ });
20
+ });
@@ -0,0 +1,52 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { render as s } from "@testing-library/react";
3
+ import "@testing-library/jest-dom";
4
+ import { Content as o } from "../components/Content.js";
5
+ jest.mock("../components/SocialMedia", () => ({
6
+ SocialMedia: () => /* @__PURE__ */ e("div", { "data-testid": "social media" })
7
+ }));
8
+ jest.mock("../constants/tips", () => ({
9
+ TIPS_LENGTH: 2,
10
+ TIPS: [
11
+ {
12
+ tip: "tip 1",
13
+ svg: () => /* @__PURE__ */ e("div", { "data-testid": "svg 1" }),
14
+ isIllustration: !1
15
+ },
16
+ {
17
+ tip: "tip 2",
18
+ svg: () => /* @__PURE__ */ e("div", { "data-testid": "svg 2" }),
19
+ isIllustration: !0
20
+ }
21
+ ]
22
+ }));
23
+ const n = jest.fn();
24
+ describe("Content component tests", () => {
25
+ it("should render nothing if step is invalid", () => {
26
+ const { container: t } = s(/* @__PURE__ */ e(o, { step: 0, sendEvent: n }));
27
+ expect(t.firstChild).toBeNull();
28
+ }), it("should render correctly texts", () => {
29
+ const { getByTestId: t, getByText: i } = s(
30
+ /* @__PURE__ */ e(o, { step: 1, sendEvent: n })
31
+ );
32
+ expect(t("svg 1")).toBeInTheDocument(), expect(i("1 de 2")).toBeInTheDocument(), expect(i("tip 1")).toBeInTheDocument();
33
+ }), it("should render correctly illustration message", () => {
34
+ const { getByText: t } = s(/* @__PURE__ */ e(o, { step: 2, sendEvent: n }));
35
+ expect(t("Imagem Ilustrativa")).toBeInTheDocument();
36
+ }), it("should render correctly social media section", () => {
37
+ const { getByTestId: t } = s(
38
+ /* @__PURE__ */ e(
39
+ o,
40
+ {
41
+ step: 2,
42
+ socialMediaLinks: {
43
+ facebook: "facebook_link",
44
+ instagram: "instagram_link"
45
+ },
46
+ sendEvent: n
47
+ }
48
+ )
49
+ );
50
+ expect(t("social media")).toBeInTheDocument();
51
+ });
52
+ });
@@ -0,0 +1,60 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { render as c, fireEvent as a } from "@testing-library/react";
3
+ import "@testing-library/jest-dom";
4
+ import { Footer as l } from "../components/Footer.js";
5
+ jest.mock("../constants/tips", () => ({ TIPS_LENGTH: 3 }));
6
+ jest.mock("../components/Bullets", () => ({
7
+ Bullets: () => /* @__PURE__ */ n("div", { "data-testid": "bullets" })
8
+ }));
9
+ const t = jest.fn(), o = jest.fn();
10
+ describe("Footer component tests", () => {
11
+ it("renders default UI", () => {
12
+ const { getByText: e } = c(
13
+ /* @__PURE__ */ n(
14
+ l,
15
+ {
16
+ step: 1,
17
+ handleBackStep: t,
18
+ handleNextStep: o
19
+ }
20
+ )
21
+ );
22
+ expect(e("Voltar")).toBeInTheDocument(), expect(e("Próximo")).toBeInTheDocument();
23
+ }), it("renders correctly button text if step is equal than TIPS_LENGTH", () => {
24
+ const { queryByText: e, getByText: s } = c(
25
+ /* @__PURE__ */ n(
26
+ l,
27
+ {
28
+ step: 3,
29
+ handleBackStep: t,
30
+ handleNextStep: o
31
+ }
32
+ )
33
+ );
34
+ expect(e("Próximo")).not.toBeInTheDocument(), expect(s("Legal, Entendi")).toBeInTheDocument();
35
+ }), it("should call handleBackStep on click back button", () => {
36
+ const { getByText: e } = c(
37
+ /* @__PURE__ */ n(
38
+ l,
39
+ {
40
+ step: 1,
41
+ handleBackStep: t,
42
+ handleNextStep: o
43
+ }
44
+ )
45
+ );
46
+ a.click(e("Voltar")), expect(t).toHaveBeenCalled();
47
+ }), it("should call handleNextStep on click confirm button", () => {
48
+ const { getByText: e } = c(
49
+ /* @__PURE__ */ n(
50
+ l,
51
+ {
52
+ step: 1,
53
+ handleBackStep: t,
54
+ handleNextStep: o
55
+ }
56
+ )
57
+ );
58
+ a.click(e("Próximo")), expect(o).toHaveBeenCalled();
59
+ });
60
+ });