trimble-terra 1.1.9-beta.6 → 1.1.9-beta.8

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 (34) hide show
  1. package/dist/src/component/Dialog/Dialog.css +1 -1
  2. package/dist/src/component/Dialog/Dialog.d.ts +4 -4
  3. package/dist/src/component/Dialog/Dialog.d.ts.map +1 -1
  4. package/dist/src/component/Dialog/Dialog.js +39 -39
  5. package/dist/src/component/FlyoutCart/FlyoutCart.d.ts.map +1 -1
  6. package/dist/src/component/FlyoutCart/FlyoutCart.js +10 -7
  7. package/dist/src/component/FlyoutCart/FlyoutCart.stories.d.ts.map +1 -1
  8. package/dist/src/component/FlyoutCartComponent/FlyoutCartComponent.js +43 -43
  9. package/dist/src/component/ProductDetail/NonBuyerPurchaseFlow/NonBuyerPurchaseFlow.css +1 -0
  10. package/dist/src/component/ProductDetail/NonBuyerPurchaseFlow/NonBuyerPurchaseFlow.d.ts +10 -0
  11. package/dist/src/component/ProductDetail/NonBuyerPurchaseFlow/NonBuyerPurchaseFlow.d.ts.map +1 -0
  12. package/dist/src/component/ProductDetail/NonBuyerPurchaseFlow/NonBuyerPurchaseFlow.js +33 -0
  13. package/dist/src/component/ProductDetail/NonBuyerPurchaseFlow/NonBuyerPurchaseFlowCard.d.ts +29 -0
  14. package/dist/src/component/ProductDetail/NonBuyerPurchaseFlow/NonBuyerPurchaseFlowCard.d.ts.map +1 -0
  15. package/dist/src/component/ProductDetail/NonBuyerPurchaseFlow/NonBuyerPurchaseFlowCard.js +82 -0
  16. package/dist/src/component/ProductDetail/ProductDetail.css +1 -1
  17. package/dist/src/component/ProductDetail/ProductDetail.d.ts +23 -5
  18. package/dist/src/component/ProductDetail/ProductDetail.d.ts.map +1 -1
  19. package/dist/src/component/ProductDetail/ProductDetail.js +255 -214
  20. package/dist/src/component/ProductDetail/ProductDetail.stories.d.ts +67 -0
  21. package/dist/src/component/ProductDetail/ProductDetail.stories.d.ts.map +1 -1
  22. package/dist/src/component/TerraLink/TerraLink.d.ts +1 -1
  23. package/dist/src/component/TerraLink/TerraLink.d.ts.map +1 -1
  24. package/dist/src/navigation/SiteNav/SiteNav.d.ts +2 -0
  25. package/dist/src/navigation/SiteNav/SiteNav.d.ts.map +1 -1
  26. package/dist/src/navigation/SiteNav/SiteNav.js +109 -106
  27. package/dist/src/navigation/SiteNav/SiteNavMobile.d.ts.map +1 -1
  28. package/dist/src/navigation/SiteNav/SiteNavMobile.js +26 -24
  29. package/dist/src/navigation/SiteNav/UtilityNavComponents/LanguageSelector/LanguageSelector.d.ts +3 -2
  30. package/dist/src/navigation/SiteNav/UtilityNavComponents/LanguageSelector/LanguageSelector.d.ts.map +1 -1
  31. package/dist/src/navigation/SiteNav/UtilityNavComponents/LanguageSelector/LanguageSelector.js +75 -75
  32. package/dist/src/navigation/SiteNav/UtilityNavComponents/SiteNavUtilityNav.d.ts.map +1 -1
  33. package/dist/src/navigation/SiteNav/UtilityNavComponents/SiteNavUtilityNav.js +24 -23
  34. package/package.json +2 -2
@@ -1 +1 @@
1
- .t2-dialog{position:fixed;z-index:5;background:#fff;max-width:500px;top:40%;left:50%;transform:translate(-50%,-50%);flex-direction:column;align-items:center;padding:32px;border-radius:10px;box-shadow:0 110px 31px #0000,0 70px 28px #00000003,0 40px 24px #0000000d,0 18px 18px #00000017,0 4px 10px #0000001a;text-transform:none;text-align:center}@media(max-height:1000px){.t2-dialog{max-height:calc(100dvh - 32px)!important;top:50%!important;overflow-y:auto!important}}@media(max-height:750px)and (max-width:650px){.t2-dialog{width:90%}}.t2-dialog p:first-of-type{margin-top:0}.t2-dialog p:last-of-type{margin-bottom:0}@media not (min-width:600px){.t2-dialog{width:90%;height:auto}}.t2-dialog__overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1000;background:#3635454d}.t2-dialog__close{all:unset;position:absolute;top:33px;right:32px;margin:0;padding:0;cursor:pointer}.t2-dialog__close:focus{outline:revert}.t2-dialog__title{color:#353a40;font-size:1.5rem;font-style:normal;font-weight:700;line-height:1.875rem;letter-spacing:1.92px}.t2-dialog__title{letter-spacing:.5px;margin:0 0 18px}.t2-dialog__content,.t2-dialog__content__text,.t2-dialog__content__text-holder{text-align:center;text-wrap:balance;color:#353a40;font-size:1.125rem;font-style:normal;font-weight:400;line-height:2rem;letter-spacing:.18px}@media screen and (max-width:600px){.t2-dialog__content,.t2-dialog__content__text,.t2-dialog__content__text-holder{font-size:1rem;line-height:1.375rem}}.t2-dialog__content--link,.t2-dialog__content__text--link,.t2-dialog__content__text-holder--link{color:#353a40;font-size:1.125rem;font-style:normal;font-weight:400;line-height:2rem;letter-spacing:.18px}@media screen and (max-width:600px){.t2-dialog__content--link,.t2-dialog__content__text--link,.t2-dialog__content__text-holder--link{font-size:1rem;line-height:1.375rem}}.t2-dialog__buttons{display:flex;gap:12px;flex-direction:row;align-items:center;justify-content:center;margin-top:32px}@media not (min-width:600px){.t2-dialog__buttons{flex-direction:column-reverse}}.t2-dialog--opened{display:flex}.t2-dialog--closed{display:none}.t2-dialog-loading__section{display:flex;gap:12px;flex-direction:column;align-items:center;justify-content:center;margin-bottom:24px;margin-top:12px}.t2-dialog-loading__text{color:#0063a3;line-height:27px;letter-spacing:.15;color:#353a40;font-size:1.125rem;font-style:normal;font-weight:400;line-height:2rem;letter-spacing:.18px}@media screen and (max-width:600px){.t2-dialog-loading__text{font-size:1rem;line-height:1.375rem}}
1
+ @keyframes t2-dialog-open{0%{opacity:0;transform:translate(-50%,-48%) scale(.9)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}.t2-dialog{position:fixed;z-index:5;box-sizing:border-box;background:#fff;max-width:560px;top:40%;left:50%;transform:translate(-50%,-50%);padding:24px 32px;border-radius:10px;box-shadow:0 110px 31px #0000,0 70px 28px #00000003,0 40px 24px #0000000d,0 18px 18px #00000017,0 4px 10px #0000001a;text-transform:none}.t2-dialog p:first-of-type{margin-top:0}.t2-dialog p:last-of-type{margin-bottom:0}@media not (min-width:600px){.t2-dialog{width:90%;height:auto}}.t2-dialog__overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1000;background:#3635454d}.t2-dialog__close{all:unset;position:absolute;top:33px;right:32px;margin:0;padding:0;cursor:pointer}.t2-dialog__close:focus{outline:revert}.t2-dialog__title{color:#353a40;font-size:1.5rem;font-style:normal;font-weight:700;line-height:1.875rem;letter-spacing:1.92px}.t2-dialog__title{letter-spacing:.5px;margin:0 0 8px}.t2-dialog__content,.t2-dialog__content__text,.t2-dialog__content__text-holder{color:#353a40;font-size:1.125rem;font-style:normal;font-weight:400;line-height:2rem;letter-spacing:.18px}@media screen and (max-width:600px){.t2-dialog__content,.t2-dialog__content__text,.t2-dialog__content__text-holder{font-size:1rem;line-height:1.375rem}}.t2-dialog__content--link,.t2-dialog__content__text--link,.t2-dialog__content__text-holder--link{color:#353a40;font-size:1.125rem;font-style:normal;font-weight:400;line-height:2rem;letter-spacing:.18px}@media screen and (max-width:600px){.t2-dialog__content--link,.t2-dialog__content__text--link,.t2-dialog__content__text-holder--link{font-size:1rem;line-height:1.375rem}}.t2-dialog__content ul,.t2-dialog__content__text ul,.t2-dialog__content__text-holder ul{margin:16px 0 0;padding-left:20px}.t2-dialog__content li,.t2-dialog__content__text li,.t2-dialog__content__text-holder li{margin-bottom:16px}.t2-dialog__content li:last-child,.t2-dialog__content__text li:last-child,.t2-dialog__content__text-holder li:last-child{margin-bottom:0}.t2-dialog__buttons{display:flex;gap:12px;flex-direction:row;justify-content:flex-end;margin-top:16px}@media not (min-width:600px){.t2-dialog__buttons{flex-direction:column-reverse}}.t2-dialog--opened{animation:t2-dialog-open .2s ease-out}.t2-dialog--closed{display:none}.t2-dialog--non-buyer-new-account{width:560px}.t2-dialog--non-buyer-new-account .t2-dialog__title{margin-bottom:16px}.t2-dialog--non-buyer-new-account .t2-dialog__content,.t2-dialog--non-buyer-new-account .t2-dialog__content__text,.t2-dialog--non-buyer-new-account .t2-dialog__content__text-holder{line-height:32px}.t2-dialog--non-buyer-new-account .t2-dialog__content p,.t2-dialog--non-buyer-new-account .t2-dialog__content__text p,.t2-dialog--non-buyer-new-account .t2-dialog__content__text-holder p{font-size:16px;margin:0 0 24px}.t2-dialog--non-buyer-new-account .t2-dialog__content ul,.t2-dialog--non-buyer-new-account .t2-dialog__content__text ul,.t2-dialog--non-buyer-new-account .t2-dialog__content__text-holder ul{font-size:16px;margin:0;padding-left:20px}.t2-dialog--non-buyer-new-account .t2-dialog__content li,.t2-dialog--non-buyer-new-account .t2-dialog__content__text li,.t2-dialog--non-buyer-new-account .t2-dialog__content__text-holder li{line-height:28px}.t2-dialog--non-buyer-new-account .t2-dialog__content li:last-child,.t2-dialog--non-buyer-new-account .t2-dialog__content__text li:last-child,.t2-dialog--non-buyer-new-account .t2-dialog__content__text-holder li:last-child{margin-bottom:0}.t2-dialog--non-buyer-new-account .t2-dialog__buttons{justify-content:flex-start;margin-top:24px;gap:12px;flex-wrap:nowrap;width:100%}.t2-dialog--non-buyer-new-account .t2-dialog__buttons .t2-button{white-space:nowrap;padding:10px 36px;font-size:1rem;font-weight:700;line-height:2.25rem;letter-spacing:.08em;text-transform:uppercase;border-radius:100px;box-shadow:none}.t2-dialog--non-buyer-new-account .t2-dialog__buttons .t2-button--secondary,.t2-dialog--non-buyer-new-account .t2-dialog__buttons .t2-button--secondary:hover,.t2-dialog--non-buyer-new-account .t2-dialog__buttons .t2-button--secondary:focus,.t2-dialog--non-buyer-new-account .t2-dialog__buttons .t2-button--secondary:visited,.t2-dialog--non-buyer-new-account .t2-dialog__buttons .t2-button--secondary:active{color:#252a2e;background-color:#fff;border:1px solid #252a2e;box-shadow:none}.t2-dialog--non-buyer-new-account .t2-dialog__buttons .t2-button--secondary:hover{background-color:#fff;border-color:#252a2e}.t2-dialog--non-buyer-new-account .t2-dialog__buttons .t2-button--primary,.t2-dialog--non-buyer-new-account .t2-dialog__buttons .t2-button--primary:hover,.t2-dialog--non-buyer-new-account .t2-dialog__buttons .t2-button--primary:focus,.t2-dialog--non-buyer-new-account .t2-dialog__buttons .t2-button--primary:visited,.t2-dialog--non-buyer-new-account .t2-dialog__buttons .t2-button--primary:active{color:#252a2e;background-color:#fbad26;border:2px solid #fbad26;box-shadow:none}.t2-dialog--non-buyer-new-account .t2-dialog__buttons .t2-button--primary:hover{background-color:#de9921;border-color:#de9921}.t2-dialog-loading__section{display:flex;gap:12px;flex-direction:column;align-items:center;justify-content:center;margin-bottom:24px;margin-top:12px}.t2-dialog-loading__text{color:#0063a3;line-height:27px;letter-spacing:.15;color:#353a40;font-size:1.125rem;font-style:normal;font-weight:400;line-height:2rem;letter-spacing:.18px}@media screen and (max-width:600px){.t2-dialog-loading__text{font-size:1rem;line-height:1.375rem}}
@@ -1,14 +1,14 @@
1
1
  interface DialogProps {
2
2
  isOpen: boolean;
3
- variant?: "loading";
3
+ variant?: "loading" | "nonBuyerNewAccount";
4
4
  title: string;
5
5
  content: string;
6
6
  loadingText?: string;
7
7
  primaryButtonText: string;
8
8
  secondaryButtonText?: string;
9
- onCloseButtonClick?: () => void;
10
- onPrimaryButtonClick?: (e?: any) => void;
11
- onSecondaryButtonClick?: () => void;
9
+ onCloseButtonClick?: (e?: React.MouseEvent<HTMLButtonElement>) => void;
10
+ onPrimaryButtonClick?: (e?: React.MouseEvent<HTMLElement>) => void;
11
+ onSecondaryButtonClick?: (e?: React.MouseEvent<HTMLElement>) => void;
12
12
  contentWithLink?: string;
13
13
  contentLink?: string;
14
14
  contentLinkText?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/component/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AAKvB,UAAU,WAAW;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,oBAAoB,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IACzC,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;IACpC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,QAAA,MAAM,MAAM,GAAI,OAAO,WAAW,4CAqGjC,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/component/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AAKvB,UAAU,WAAW;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,SAAS,GAAG,oBAAoB,CAAC;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kBAAkB,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACvE,oBAAoB,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACnE,sBAAsB,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACrE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,QAAA,MAAM,MAAM,GAAI,OAAO,WAAW,4CAqGjC,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1,30 +1,30 @@
1
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
1
+ import { jsx as n, jsxs as t } from "react/jsx-runtime";
2
2
  import './Dialog.css';/* empty css */
3
3
  import L from "../LoadingSpinner/LoadingSpinner.js";
4
4
  import { checkAndSet as x } from "../../utils/checkForDangerouslySet.js";
5
- import { TerraLink as e } from "../TerraLink/TerraLink.js";
6
- const w = (g) => {
5
+ import { TerraLink as i } from "../TerraLink/TerraLink.js";
6
+ const w = (m) => {
7
7
  const {
8
8
  isOpen: o,
9
- variant: u,
10
- title: a,
11
- content: r,
12
- loadingText: s,
9
+ variant: a,
10
+ title: r,
11
+ content: c,
12
+ loadingText: d,
13
13
  primaryButtonText: h = "OK",
14
14
  secondaryButtonText: _ = "Cancel",
15
- onCloseButtonClick: c,
15
+ onCloseButtonClick: s,
16
16
  onPrimaryButtonClick: l,
17
- onSecondaryButtonClick: i,
18
- contentWithLink: d,
19
- contentLink: C,
20
- contentLinkText: m
21
- } = g, p = () => c ? /* @__PURE__ */ t(
17
+ onSecondaryButtonClick: e,
18
+ contentWithLink: C,
19
+ contentLink: g,
20
+ contentLinkText: u
21
+ } = m, p = () => s ? /* @__PURE__ */ n(
22
22
  "button",
23
23
  {
24
24
  className: "t2-dialog__close",
25
- onClick: c,
25
+ onClick: s,
26
26
  "aria-label": "Close Dialog",
27
- children: /* @__PURE__ */ t(
27
+ children: /* @__PURE__ */ n(
28
28
  "svg",
29
29
  {
30
30
  xmlns: "http://www.w3.org/2000/svg",
@@ -32,7 +32,7 @@ const w = (g) => {
32
32
  height: "21",
33
33
  viewBox: "0 0 20 21",
34
34
  fill: "none",
35
- children: /* @__PURE__ */ t(
35
+ children: /* @__PURE__ */ n(
36
36
  "path",
37
37
  {
38
38
  d: "M15.2499 5.58762C15.1728 5.51037 15.0813 5.44908 14.9805 5.40726C14.8797 5.36544 14.7716 5.34392 14.6624 5.34392C14.5533 5.34392 14.4452 5.36544 14.3444 5.40726C14.2436 5.44908 14.152 5.51037 14.0749 5.58762L9.99994 9.65429L5.92494 5.57929C5.84779 5.50214 5.7562 5.44094 5.6554 5.39918C5.55459 5.35743 5.44655 5.33594 5.33744 5.33594C5.22833 5.33594 5.12029 5.35743 5.01949 5.39918C4.91869 5.44094 4.82709 5.50214 4.74994 5.57929C4.67279 5.65644 4.61159 5.74803 4.56984 5.84884C4.52808 5.94964 4.50659 6.05768 4.50659 6.16679C4.50659 6.2759 4.52808 6.38394 4.56984 6.48474C4.61159 6.58554 4.67279 6.67714 4.74994 6.75429L8.82494 10.8293L4.74994 14.9043C4.67279 14.9814 4.61159 15.073 4.56984 15.1738C4.52808 15.2746 4.50659 15.3827 4.50659 15.4918C4.50659 15.6009 4.52808 15.7089 4.56984 15.8097C4.61159 15.9105 4.67279 16.0021 4.74994 16.0793C4.82709 16.1564 4.91869 16.2176 5.01949 16.2594C5.12029 16.3011 5.22833 16.3226 5.33744 16.3226C5.44655 16.3226 5.55459 16.3011 5.6554 16.2594C5.7562 16.2176 5.84779 16.1564 5.92494 16.0793L9.99994 12.0043L14.0749 16.0793C14.1521 16.1564 14.2437 16.2176 14.3445 16.2594C14.4453 16.3011 14.5533 16.3226 14.6624 16.3226C14.7716 16.3226 14.8796 16.3011 14.9804 16.2594C15.0812 16.2176 15.1728 16.1564 15.2499 16.0793C15.3271 16.0021 15.3883 15.9105 15.43 15.8097C15.4718 15.7089 15.4933 15.6009 15.4933 15.4918C15.4933 15.3827 15.4718 15.2746 15.43 15.1738C15.3883 15.073 15.3271 14.9814 15.2499 14.9043L11.1749 10.8293L15.2499 6.75429C15.5666 6.43762 15.5666 5.90429 15.2499 5.58762Z",
@@ -42,51 +42,51 @@ const w = (g) => {
42
42
  }
43
43
  )
44
44
  }
45
- ) : null, k = () => l || i ? /* @__PURE__ */ n("div", { className: "t2-dialog__buttons", children: [
46
- i && /* @__PURE__ */ t(
47
- e,
45
+ ) : null, k = () => l || e ? /* @__PURE__ */ t("div", { className: "t2-dialog__buttons", children: [
46
+ e && /* @__PURE__ */ n(
47
+ i,
48
48
  {
49
49
  label: _,
50
- size: "small",
51
- onClickHandler: i
50
+ size: "large",
51
+ onClickHandler: e
52
52
  }
53
53
  ),
54
- l && /* @__PURE__ */ t(
55
- e,
54
+ l && /* @__PURE__ */ n(
55
+ i,
56
56
  {
57
57
  label: h,
58
58
  primary: !0,
59
- size: "small",
59
+ size: "large",
60
60
  onClickHandler: l
61
61
  }
62
62
  )
63
63
  ] }) : null;
64
- return /* @__PURE__ */ t("div", { className: `${o ? "t2-dialog__overlay" : ""}`, children: /* @__PURE__ */ n(
64
+ return /* @__PURE__ */ n("div", { className: `${o ? "t2-dialog__overlay" : ""}`, children: /* @__PURE__ */ t(
65
65
  "div",
66
66
  {
67
- className: `t2-dialog ${o ? "t2-dialog--opened" : "t2-dialog--closed"}`,
67
+ className: `t2-dialog ${o ? "t2-dialog--opened" : "t2-dialog--closed"}${a === "nonBuyerNewAccount" ? " t2-dialog--non-buyer-new-account" : ""}`,
68
68
  children: [
69
- /* @__PURE__ */ t(p, {}),
70
- u === "loading" && /* @__PURE__ */ n("div", { className: "t2-dialog-loading__section", children: [
71
- /* @__PURE__ */ t(L, {}),
72
- s && /* @__PURE__ */ t("span", { className: "t2-dialog-loading__text", children: s })
69
+ /* @__PURE__ */ n(p, {}),
70
+ a === "loading" && /* @__PURE__ */ t("div", { className: "t2-dialog-loading__section", children: [
71
+ /* @__PURE__ */ n(L, {}),
72
+ d && /* @__PURE__ */ n("span", { className: "t2-dialog-loading__text", children: d })
73
73
  ] }),
74
- a && /* @__PURE__ */ t("h6", { className: "t2-dialog__title", children: a }),
75
- r && x(r, "t2-dialog__content", null, null),
76
- d && C && m && /* @__PURE__ */ n("div", { className: "t2-dialog__content", children: [
77
- d,
74
+ r && /* @__PURE__ */ n("h6", { className: "t2-dialog__title", children: r }),
75
+ c && x(c, "t2-dialog__content", null, null),
76
+ C && g && u && /* @__PURE__ */ t("div", { className: "t2-dialog__content", children: [
77
+ C,
78
78
  " ",
79
- /* @__PURE__ */ t(
80
- e,
79
+ /* @__PURE__ */ n(
80
+ i,
81
81
  {
82
82
  className: "t2-dialog__content--link",
83
- destination: C,
83
+ destination: g,
84
84
  linkType: "text",
85
- children: m
85
+ children: u
86
86
  }
87
87
  )
88
88
  ] }),
89
- /* @__PURE__ */ t(k, {})
89
+ /* @__PURE__ */ n(k, {})
90
90
  ]
91
91
  }
92
92
  ) });
@@ -1 +1 @@
1
- {"version":3,"file":"FlyoutCart.d.ts","sourceRoot":"","sources":["../../../../src/component/FlyoutCart/FlyoutCart.jsx"],"names":[],"mappings":";AAyKA,iFAgPC"}
1
+ {"version":3,"file":"FlyoutCart.d.ts","sourceRoot":"","sources":["../../../../src/component/FlyoutCart/FlyoutCart.jsx"],"names":[],"mappings":";AA8KA,iFAgPC"}
@@ -116,15 +116,18 @@ const U = ({ message: a, timeStamp: e }) => {
116
116
  if (c) {
117
117
  const {
118
118
  checkoutBtnLabel: r = "Proceed to Checkout",
119
- checkoutBtnUrl: n = "https://www.trimble.com"
119
+ checkoutBtnUrl: n = "https://www.trimble.com",
120
+ checkoutBtnMethod: i
120
121
  } = e;
121
122
  return /* @__PURE__ */ t(
122
123
  p,
123
124
  {
124
125
  label: r,
125
- destination: n,
126
+ ...i ? { onClickHandler: i } : {
127
+ destination: n,
128
+ internalLinkComponent: !0
129
+ },
126
130
  LinkComponent: l,
127
- internalLinkComponent: !0,
128
131
  primary: !0,
129
132
  className: "t2-cart-flyout__buttons__button t2-cart-flyout__buttons__button--primary",
130
133
  openInSameTabExternalLink: !0
@@ -193,7 +196,7 @@ const U = ({ message: a, timeStamp: e }) => {
193
196
  timeStamp: Date.now()
194
197
  });
195
198
  });
196
- }, P = (u, v, C, h) => {
199
+ }, H = (u, v, C, h) => {
197
200
  const y = n(u, v, C, h);
198
201
  y && y.then((R) => {
199
202
  R && h === 0 && L({
@@ -201,7 +204,7 @@ const U = ({ message: a, timeStamp: e }) => {
201
204
  timeStamp: Date.now()
202
205
  });
203
206
  });
204
- }, H = (u) => {
207
+ }, P = (u) => {
205
208
  u.preventDefault(), S && S();
206
209
  }, Q = new Intl.NumberFormat(void 0, {
207
210
  style: "currency",
@@ -251,7 +254,7 @@ const U = ({ message: a, timeStamp: e }) => {
251
254
  {
252
255
  href: "",
253
256
  className: "t2-cart-flyout__header__account__link",
254
- onClick: H,
257
+ onClick: P,
255
258
  children: [
256
259
  D,
257
260
  /* @__PURE__ */ t(
@@ -316,7 +319,7 @@ const U = ({ message: a, timeStamp: e }) => {
316
319
  cartSettings: c,
317
320
  isCartFlyoutActive: l,
318
321
  setCartFlyoutActive: r,
319
- onChangeQuantity: P,
322
+ onChangeQuantity: H,
320
323
  onRemove: Z,
321
324
  LinkComponent: d,
322
325
  locale: m
@@ -1 +1 @@
1
- {"version":3,"file":"FlyoutCart.stories.d.ts","sourceRoot":"","sources":["../../../../src/component/FlyoutCart/FlyoutCart.stories.jsx"],"names":[],"mappings":";;;;;;;;;;IAkJU,oEA0EP;;;;;;;;IAqDO,6EA8DP;;;;;;;;;IAQO,6EAWP;;;;;;;;;IAqCO,6EAwEP;;;uBA7coB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqHlB,sCAAY;;;;;;;;;;;;;;IAab,gCAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAvHH;;;;;;;;;;;;;IA6BE;AAEF;;;;;;;;;;;;;;IA+BE;AAkJF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgCC;AAqGD;;;;;;;;;;;;;;;IAkBC"}
1
+ {"version":3,"file":"FlyoutCart.stories.d.ts","sourceRoot":"","sources":["../../../../src/component/FlyoutCart/FlyoutCart.stories.jsx"],"names":[],"mappings":";;;;;;;;;;IAkJU,oEA0EP;;;;;;;;IAqDO,6EAgEP;;;;;;;;;IAQO,6EAWP;;;;;;;;;IAqCO,6EA0EP;;;uBAjdoB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqHlB,sCAAY;;;;;;;;;;;;;;IAab,gCAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAvHH;;;;;;;;;;;;;IA6BE;AAEF;;;;;;;;;;;;;;IA+BE;AAkJF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgCC;AAuGD;;;;;;;;;;;;;;;IAkBC"}
@@ -3,8 +3,8 @@ import T, { useRef as ae, useState as V, useEffect as ie } from "react";
3
3
  import { QuantityTracker as ne } from "../QuantityTracker/QuantityTracker.js";
4
4
  import { ErrorMessage as L } from "../QuantityTracker/ErrorMessage.js";
5
5
  import ce from "../CreditsTracker/CreditsTracker.js";
6
- import { TerraLink as se } from "../TerraLink/TerraLink.js";
7
- import le from "../ProductDetail/PromoCodeBadge/PromoCodeBadge.js";
6
+ import { TerraLink as le } from "../TerraLink/TerraLink.js";
7
+ import se from "../ProductDetail/PromoCodeBadge/PromoCodeBadge.js";
8
8
  import './FlyoutCartComponent.css';/* empty css */
9
9
  const oe = {
10
10
  removeBtnLabel: "Remove",
@@ -15,102 +15,102 @@ function ye({
15
15
  id: o,
16
16
  imageURL: H,
17
17
  name: a,
18
- quantity: f = 1,
18
+ quantity: p = 1,
19
19
  sku: c,
20
- price: p,
20
+ price: b,
21
21
  strikePrice: Q,
22
22
  discount: $,
23
- discountCode: B,
23
+ discountCode: q,
24
24
  duration: F,
25
- isMinThresholdError: q = !1,
25
+ isMinThresholdError: B = !1,
26
26
  isMaxThresholdError: Z = !1,
27
27
  link: N,
28
28
  labels: D,
29
- settings: b = { ...oe },
29
+ settings: _ = { ...oe },
30
30
  isLoading: E = !1,
31
31
  creditProduct: g = !1,
32
32
  min: M,
33
33
  max: j,
34
34
  increment: I,
35
35
  locale: C,
36
- onChangeQuantity: _ = () => {
36
+ onChangeQuantity: h = () => {
37
37
  },
38
38
  onRemove: A = () => {
39
39
  },
40
40
  LinkComponent: K
41
41
  }) {
42
- const v = ae(null), [r, s] = V(f), [m, u] = V(null);
42
+ const v = ae(null), [r, l] = V(p), [m, u] = V(null);
43
43
  ie(() => {
44
- typeof f == "number" && s(f);
45
- }, [f]);
44
+ typeof p == "number" && l(p);
45
+ }, [p]);
46
46
  const k = () => {
47
47
  if (typeof r != "number") return;
48
48
  m && clearTimeout(m);
49
49
  const t = r - 1;
50
- s(t);
50
+ l(t);
51
51
  const i = setTimeout(() => {
52
- _(o, c, a, t), u(null);
52
+ h(o, c, a, t), u(null);
53
53
  }, 1e3);
54
54
  u(i);
55
55
  }, G = () => {
56
56
  if (typeof r != "number") return;
57
57
  m && clearTimeout(m);
58
58
  const t = r + 1;
59
- s(t);
59
+ l(t);
60
60
  const i = setTimeout(() => {
61
- _(o, c, a, t), u(null);
61
+ h(o, c, a, t), u(null);
62
62
  }, 1e3);
63
63
  u(i);
64
64
  }, O = (t) => {
65
65
  if (t.currentTarget.value === "") {
66
- s(0);
66
+ l(0);
67
67
  return;
68
68
  }
69
69
  const i = parseInt(t.currentTarget.value);
70
- s(i);
70
+ l(i);
71
71
  }, U = (t) => {
72
72
  t.preventDefault(), A(o, c, a);
73
73
  }, W = () => {
74
74
  if (typeof r == "number") {
75
75
  if (r < 0) return;
76
- _(o, c, a, r);
76
+ h(o, c, a, r);
77
77
  } else
78
- s(1), _(o, c, a, 1);
78
+ l(1), h(o, c, a, 1);
79
79
  }, X = (t) => {
80
80
  t.key === "Enter" && v ? v?.current?.blur() : t.key.toLowerCase() === "e" && t.preventDefault();
81
81
  }, z = (t) => {
82
- s(t), m && clearTimeout(m);
82
+ l(t), m && clearTimeout(m);
83
83
  const i = setTimeout(() => {
84
- _(o, c, a, t), u(null);
84
+ h(o, c, a, t), u(null);
85
85
  }, 1e3);
86
86
  u(i);
87
87
  }, {
88
88
  removeBtnLabel: J = "Remove",
89
- minimumMaximumLabel: h,
89
+ minimumMaximumLabel: f,
90
90
  creditExpirationNoticeLabel: w,
91
91
  belowMinimumLabel: x,
92
92
  aboveMaximumLabel: Y
93
- } = b, P = (M ?? 0) > 1 && x ? x.replace(
93
+ } = _, P = (M ?? 0) > 1 && x ? x.replace(
94
94
  /\{[^}]+\}/g,
95
95
  (M ?? 0).toLocaleString(C)
96
- ) : b?.errorMessageForMinQuantity, ee = (() => {
97
- if (!h || h.length === 0) return "";
96
+ ) : _?.errorMessageForMinQuantity, ee = (() => {
97
+ if (!f || f.length === 0) return "";
98
98
  const t = [(I ?? 0).toLocaleString(C)];
99
99
  let i = 0;
100
- const S = (y, l) => y.split(/(\{[^}]+\})/g).map((d, R) => {
100
+ const S = (y, s) => y.split(/(\{[^}]+\})/g).map((d, R) => {
101
101
  if (/^\{[^}]+\}$/.test(d)) {
102
102
  const re = t[i++] ?? d;
103
- return /* @__PURE__ */ e(T.Fragment, { children: re }, `${l}-${R}`);
103
+ return /* @__PURE__ */ e(T.Fragment, { children: re }, `${s}-${R}`);
104
104
  }
105
- return /* @__PURE__ */ e(T.Fragment, { children: d }, `${l}-${R}`);
105
+ return /* @__PURE__ */ e(T.Fragment, { children: d }, `${s}-${R}`);
106
106
  });
107
- return h.split(/(\*\*[^*]+\*\*)/g).map((y, l) => {
107
+ return f.split(/(\*\*[^*]+\*\*)/g).map((y, s) => {
108
108
  const d = /^\*\*([^*]+)\*\*$/.exec(y);
109
- return d ? /* @__PURE__ */ e("strong", { children: S(d[1], `b-${l}`) }, `b-${l}`) : /* @__PURE__ */ e(T.Fragment, { children: S(y, `p-${l}`) }, `p-${l}`);
109
+ return d ? /* @__PURE__ */ e("strong", { children: S(d[1], `b-${s}`) }, `b-${s}`) : /* @__PURE__ */ e(T.Fragment, { children: S(y, `p-${s}`) }, `p-${s}`);
110
110
  });
111
111
  })(), te = new Intl.NumberFormat(void 0, {
112
112
  style: "currency",
113
- currency: p?.currencyCode || "USD",
113
+ currency: b?.currencyCode || "USD",
114
114
  currencyDisplay: "narrowSymbol"
115
115
  });
116
116
  return /* @__PURE__ */ n("div", { className: "ter-cart-item", children: [
@@ -130,21 +130,21 @@ function ye({
130
130
  "SKU: ",
131
131
  c
132
132
  ] }),
133
- p && /* @__PURE__ */ n("div", { className: "ter-cart-item__price-wrapper", children: [
133
+ b && /* @__PURE__ */ n("div", { className: "ter-cart-item__price-wrapper", children: [
134
134
  Q && /* @__PURE__ */ e("span", { className: "ter-cart-item__price--strike", children: Q }),
135
135
  /* @__PURE__ */ n("span", { className: "ter-cart-item__price", children: [
136
- te.format(p?.amount),
136
+ te.format(b?.amount),
137
137
  " ",
138
- p?.currencyCode
138
+ b?.currencyCode
139
139
  ] }),
140
140
  " ",
141
141
  F && /* @__PURE__ */ e("span", { className: "ter-cart-item__duration", children: F })
142
142
  ] }),
143
143
  $ && /* @__PURE__ */ e(
144
- le,
144
+ se,
145
145
  {
146
146
  discount: $,
147
- discountCode: B,
147
+ discountCode: q,
148
148
  className: "ter-cart-item__discount"
149
149
  }
150
150
  ),
@@ -167,12 +167,12 @@ function ye({
167
167
  }
168
168
  )
169
169
  ] }),
170
- g && (h || w) && /* @__PURE__ */ n("div", { className: "ter-cart-item__credit-notice", children: [
171
- h && /* @__PURE__ */ e("p", { className: "ter-cart-item__credit-notice__line", children: ee }),
170
+ g && (f || w) && /* @__PURE__ */ n("div", { className: "ter-cart-item__credit-notice", children: [
171
+ f && /* @__PURE__ */ e("p", { className: "ter-cart-item__credit-notice__line", children: ee }),
172
172
  w && /* @__PURE__ */ e("p", { className: "ter-cart-item__credit-notice__line", children: w })
173
173
  ] }),
174
174
  !g && /* @__PURE__ */ n("div", { className: "ter-cart-item__qty", children: [
175
- /* @__PURE__ */ e("span", { className: "ter-cart-item__qty__label", children: D?.quantityLabel ?? "Quantity" }),
175
+ /* @__PURE__ */ e("span", { className: "ter-cart-item__qty__label", children: _?.quantityLabel ?? D?.quantityLabel ?? "Quantity" }),
176
176
  /* @__PURE__ */ e(
177
177
  ne,
178
178
  {
@@ -217,11 +217,11 @@ function ye({
217
217
  ]
218
218
  }
219
219
  ),
220
- Number(r) < 0 && /* @__PURE__ */ e(L, { errorMessage: b?.errorMessageForMinQuantity }),
221
- q && /* @__PURE__ */ e(L, { errorMessage: P }),
222
- Z && /* @__PURE__ */ e(L, { errorMessage: b?.errorMessageForMaxQuantity }),
220
+ Number(r) < 0 && /* @__PURE__ */ e(L, { errorMessage: _?.errorMessageForMinQuantity }),
221
+ B && /* @__PURE__ */ e(L, { errorMessage: P }),
222
+ Z && /* @__PURE__ */ e(L, { errorMessage: _?.errorMessageForMaxQuantity }),
223
223
  N && /* @__PURE__ */ e("div", { className: "ter-cart-item__link-wrapper", children: /* @__PURE__ */ e(
224
- se,
224
+ le,
225
225
  {
226
226
  label: N.text,
227
227
  destination: N.url,
@@ -0,0 +1 @@
1
+ .non-buyer-layout{box-sizing:border-box;margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw);padding:100px 0;background-color:#f5f5f5}.non-buyer-layout__content{box-sizing:border-box;width:100%;max-width:1440px;margin:0 auto;padding:0 80px}.non-buyer-layout__header{margin-bottom:56px;text-align:left}.non-buyer-layout__title{margin:0 0 16px;color:#171717;font-size:40px;font-weight:300;line-height:48px;letter-spacing:.02em;text-align:left}.non-buyer-layout__description{margin:0;color:#171717;font-size:18px;font-weight:400;line-height:32px;text-align:left}.non-buyer-layout__cards{display:flex;flex-wrap:wrap;gap:48px;justify-content:center;align-items:stretch}.non-buyer-layout-card{display:flex;flex-direction:column;justify-content:space-between;box-sizing:border-box;flex:0 1 400px;width:100%;max-width:400px;min-width:0;padding:40px;background-color:#fff;border-radius:12px;box-shadow:0 10px 25px -5px #0000001a,0 8px 10px -6px #0000001a}.non-buyer-layout-card__content{display:flex;flex-direction:column;flex-grow:1}.non-buyer-layout-card__header{margin:0 0 16px;color:#171717;font-size:36px;font-weight:300;line-height:43px;letter-spacing:-.01em}.non-buyer-layout-card__description{margin:0;color:#171717;font-size:16px;font-weight:400;line-height:26px}.non-buyer-layout-card__cta{margin-top:40px;padding-top:0}.non-buyer-layout-card__cta .t2-button{width:auto}@media(max-width:1279px){.non-buyer-layout__content{padding:0 20px}}@media(max-width:768px){.non-buyer-layout__title{font-size:32px;line-height:40px}.non-buyer-layout__description{font-size:16px;line-height:22px}.non-buyer-layout__header{margin-bottom:32px}.non-buyer-layout-card{flex:1 1 100%;max-width:400px}}@media(max-width:640px){.non-buyer-layout{padding:40px 0}.non-buyer-layout-card{padding:24px}.non-buyer-layout-card__header{font-size:30px;line-height:36px}.non-buyer-layout-card__cta{margin-top:32px}}@media(max-width:600px){.non-buyer-layout__title{font-size:26px;line-height:32px}.non-buyer-layout__description{font-size:16px;line-height:22px}.non-buyer-layout__cards{flex-direction:column;align-items:center;gap:24px}.non-buyer-layout-card{padding:64px 32px;flex:0 0 auto;width:100%;max-width:342px;min-height:416px}}
@@ -0,0 +1,10 @@
1
+ import { NonBuyerPurchaseFlowCard, NonBuyerPurchaseFlowCardProps } from './NonBuyerPurchaseFlowCard';
2
+ export type NonBuyerPurchaseFlowProps = {
3
+ title?: string;
4
+ description?: string;
5
+ cards?: NonBuyerPurchaseFlowCardProps[];
6
+ };
7
+ export type { NonBuyerPurchaseFlowCardProps, NonBuyerPurchaseFlowCta, NonBuyerPurchaseFlowDialog, } from './NonBuyerPurchaseFlowCard';
8
+ export declare function NonBuyerPurchaseFlow({ title, description, cards, }: NonBuyerPurchaseFlowProps): import("react/jsx-runtime").JSX.Element | null;
9
+ export { NonBuyerPurchaseFlowCard };
10
+ //# sourceMappingURL=NonBuyerPurchaseFlow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NonBuyerPurchaseFlow.d.ts","sourceRoot":"","sources":["../../../../../src/component/ProductDetail/NonBuyerPurchaseFlow/NonBuyerPurchaseFlow.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,KAAK,6BAA6B,EACnC,MAAM,4BAA4B,CAAA;AACnC,OAAO,4BAA4B,CAAA;AAEnC,MAAM,MAAM,yBAAyB,GAAG;IACtC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,6BAA6B,EAAE,CAAA;CACxC,CAAA;AAED,YAAY,EACV,6BAA6B,EAC7B,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,4BAA4B,CAAA;AAEnC,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EACL,WAAW,EACX,KAAK,GACN,EAAE,yBAAyB,kDAiC3B;AAED,OAAO,EAAE,wBAAwB,EAAE,CAAA"}
@@ -0,0 +1,33 @@
1
+ import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
+ import { NonBuyerPurchaseFlowCard as y } from "./NonBuyerPurchaseFlowCard.js";
3
+ import './NonBuyerPurchaseFlow.css';/* empty css */
4
+ function m({
5
+ title: n,
6
+ description: r,
7
+ cards: a
8
+ }) {
9
+ return !n && !r && !a?.length ? null : /* @__PURE__ */ e(
10
+ "section",
11
+ {
12
+ className: "non-buyer-layout",
13
+ ...n ? { "aria-label": n } : {},
14
+ children: /* @__PURE__ */ l("div", { className: "non-buyer-layout__content", children: [
15
+ (n || r) && /* @__PURE__ */ l("div", { className: "non-buyer-layout__header", children: [
16
+ n && /* @__PURE__ */ e("h2", { className: "non-buyer-layout__title", children: n }),
17
+ r && /* @__PURE__ */ e("p", { className: "non-buyer-layout__description", children: r })
18
+ ] }),
19
+ a?.length && /* @__PURE__ */ e("div", { className: "non-buyer-layout__cards", children: a.map((o, u) => /* @__PURE__ */ e(
20
+ y,
21
+ {
22
+ ...o
23
+ },
24
+ o.header ?? `non-buyer-layout-card-${u}`
25
+ )) })
26
+ ] })
27
+ }
28
+ );
29
+ }
30
+ export {
31
+ m as NonBuyerPurchaseFlow,
32
+ y as NonBuyerPurchaseFlowCard
33
+ };
@@ -0,0 +1,29 @@
1
+ export type NonBuyerPurchaseFlowDialog = {
2
+ variant?: "loading" | "nonBuyerNewAccount";
3
+ title: string;
4
+ content: string;
5
+ loadingText?: string;
6
+ primaryButtonText: string;
7
+ secondaryButtonText?: string;
8
+ openOnSuccess?: boolean;
9
+ onCloseButtonClick?: () => void;
10
+ onPrimaryButtonClick?: () => void;
11
+ onSecondaryButtonClick?: () => void;
12
+ contentWithLink?: string;
13
+ contentLink?: string;
14
+ contentLinkText?: string;
15
+ };
16
+ export type NonBuyerPurchaseFlowCta = {
17
+ label: string;
18
+ destination?: string;
19
+ onClick?: () => void | boolean | Promise<void | boolean>;
20
+ ariaLabel?: string;
21
+ };
22
+ export type NonBuyerPurchaseFlowCardProps = {
23
+ header?: string;
24
+ description?: string;
25
+ cta?: NonBuyerPurchaseFlowCta;
26
+ dialog?: NonBuyerPurchaseFlowDialog;
27
+ };
28
+ export declare function NonBuyerPurchaseFlowCard({ header, description, cta, dialog, }: NonBuyerPurchaseFlowCardProps): import("react/jsx-runtime").JSX.Element | null;
29
+ //# sourceMappingURL=NonBuyerPurchaseFlowCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NonBuyerPurchaseFlowCard.d.ts","sourceRoot":"","sources":["../../../../../src/component/ProductDetail/NonBuyerPurchaseFlow/NonBuyerPurchaseFlowCard.tsx"],"names":[],"mappings":"AAGA,OAAO,4BAA4B,CAAA;AAEnC,MAAM,MAAM,0BAA0B,GAAG;IACvC,OAAO,CAAC,EAAE,SAAS,GAAG,oBAAoB,CAAA;IAC1C,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,iBAAiB,EAAE,MAAM,CAAA;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC/B,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAA;IACjC,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAA;IACnC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,CAAA;IACxD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,GAAG,CAAC,EAAE,uBAAuB,CAAA;IAC7B,MAAM,CAAC,EAAE,0BAA0B,CAAA;CACpC,CAAA;AAED,wBAAgB,wBAAwB,CAAC,EACvC,MAAM,EACN,WAAW,EACX,GAAG,EACH,MAAM,GACP,EAAE,6BAA6B,kDAkH/B"}
@@ -0,0 +1,82 @@
1
+ import { jsxs as s, Fragment as y, jsx as t } from "react/jsx-runtime";
2
+ import { useState as m, useEffect as f } from "react";
3
+ import d from "../../Dialog/Dialog.js";
4
+ import { TerraLink as k } from "../../TerraLink/TerraLink.js";
5
+ import './NonBuyerPurchaseFlow.css';/* empty css */
6
+ function x({
7
+ header: r,
8
+ description: i,
9
+ cta: e,
10
+ dialog: n
11
+ }) {
12
+ const [o, l] = m(!1);
13
+ if (f(() => {
14
+ if (!o)
15
+ return;
16
+ const a = document.body.style.overflow;
17
+ return document.body.style.overflow = "hidden", () => {
18
+ document.body.style.overflow = a;
19
+ };
20
+ }, [o]), !r && !i && !e?.label)
21
+ return null;
22
+ const u = async () => {
23
+ if (n?.openOnSuccess) {
24
+ if (!e?.onClick)
25
+ return;
26
+ try {
27
+ await e.onClick() !== !1 && l(!0);
28
+ } catch {
29
+ }
30
+ return;
31
+ }
32
+ e?.onClick?.(), n && l(!0);
33
+ }, c = () => l(!1);
34
+ return /* @__PURE__ */ s(y, { children: [
35
+ /* @__PURE__ */ s("div", { className: "non-buyer-layout-card", children: [
36
+ /* @__PURE__ */ s("div", { className: "non-buyer-layout-card__content", children: [
37
+ r && /* @__PURE__ */ t("h3", { className: "non-buyer-layout-card__header", children: r }),
38
+ i && /* @__PURE__ */ t("p", { className: "non-buyer-layout-card__description", children: i })
39
+ ] }),
40
+ e?.label && /* @__PURE__ */ t("div", { className: "non-buyer-layout-card__cta", children: /* @__PURE__ */ t(
41
+ k,
42
+ {
43
+ primary: !0,
44
+ size: "large",
45
+ label: e.label,
46
+ destination: n ? void 0 : e.destination ?? "#",
47
+ ariaLabel: e.ariaLabel ?? e.label,
48
+ onClickHandler: n || e.onClick ? () => {
49
+ u();
50
+ } : void 0
51
+ }
52
+ ) })
53
+ ] }),
54
+ n && o && /* @__PURE__ */ t(
55
+ d,
56
+ {
57
+ isOpen: o,
58
+ variant: n.variant,
59
+ title: n.title,
60
+ content: n.content,
61
+ loadingText: n.loadingText,
62
+ primaryButtonText: n.primaryButtonText,
63
+ secondaryButtonText: n.secondaryButtonText,
64
+ contentWithLink: n.contentWithLink,
65
+ contentLink: n.contentLink,
66
+ contentLinkText: n.contentLinkText,
67
+ onCloseButtonClick: () => {
68
+ n.onCloseButtonClick?.(), c();
69
+ },
70
+ onPrimaryButtonClick: () => {
71
+ n.onPrimaryButtonClick?.(), c();
72
+ },
73
+ onSecondaryButtonClick: n.secondaryButtonText ? () => {
74
+ n.onSecondaryButtonClick?.(), c();
75
+ } : void 0
76
+ }
77
+ )
78
+ ] });
79
+ }
80
+ export {
81
+ x as NonBuyerPurchaseFlowCard
82
+ };