@tesouro/embedded-components-react 0.11.63 → 0.11.65

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.
package/dist/index.css CHANGED
@@ -4700,9 +4700,6 @@
4700
4700
  .ttw\:opacity-70 {
4701
4701
  opacity: 70%;
4702
4702
  }
4703
- .ttw\:opacity-90 {
4704
- opacity: 90%;
4705
- }
4706
4703
  .ttw\:shadow {
4707
4704
  --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
4708
4705
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
package/dist/index.d.ts CHANGED
@@ -5358,7 +5358,7 @@ interface OfferWidgetLabels {
5358
5358
  applyNow: string;
5359
5359
  learnMore: string;
5360
5360
  primaryCta: string;
5361
- /** Small caption next to the modal CTA, e.g. "takes about 5 minutes". */
5361
+ /** Small caption below the modal CTA, e.g. "Takes 5 minutes". */
5362
5362
  primaryCtaSubtext: string;
5363
5363
  dismissModalAriaLabel: string;
5364
5364
  }
@@ -8,7 +8,7 @@ interface OfferWidgetLabels {
8
8
  applyNow: string;
9
9
  learnMore: string;
10
10
  primaryCta: string;
11
- /** Small caption next to the modal CTA, e.g. "takes about 5 minutes". */
11
+ /** Small caption below the modal CTA, e.g. "Takes 5 minutes". */
12
12
  primaryCtaSubtext: string;
13
13
  dismissModalAriaLabel: string;
14
14
  }
@@ -31,11 +31,11 @@ var C = 2 ** 31 - 1, w = /* @__PURE__ */ new Set([
31
31
  [d.DeniedByYou]: "deniedByYou",
32
32
  [d.DeniedByOther]: "deniedByOther"
33
33
  }, E = {
34
- [d.DraftStartedByOther]: h.Brand,
34
+ [d.DraftStartedByOther]: h.Info,
35
35
  [d.SubmittedByYou]: h.Warning,
36
36
  [d.SubmittedByOther]: h.Warning,
37
- [d.DeniedByYou]: h.Danger,
38
- [d.DeniedByOther]: h.Danger
37
+ [d.DeniedByYou]: h.Destructive,
38
+ [d.DeniedByOther]: h.Destructive
39
39
  };
40
40
  function D(e) {
41
41
  return e in T;
@@ -1,7 +1,7 @@
1
1
  // ../../libs/tesouro-embedded-components-react/offer-widget/feature/dist/lib/analytics/events.js
2
2
  var e = {
3
- Mounted: "marketing.mounted",
4
- OpenModal: "marketing.open_modal",
5
- PrimaryCta: "marketing.primary_cta"
6
- }, t = "marketing";
3
+ Mounted: "offer.mounted",
4
+ OpenModal: "offer.open_modal",
5
+ PrimaryCta: "offer.primary_cta"
6
+ }, t = "offer";
7
7
  export { e as OfferWidgetAnalyticsEvent, t as WIDGET_NAME };
@@ -1,10 +1,10 @@
1
1
  // ../../libs/tesouro-embedded-components-react/offer-widget/feature/dist/lib/testIds.js
2
2
  var e = {
3
- root: "marketing-widget",
4
- learnMoreButton: "marketing-widget-learn-more-button",
5
- applyNowButton: "marketing-widget-apply-now-button",
6
- statusMessage: "marketing-widget-status-message",
7
- modal: "marketing-widget-modal",
8
- primaryCtaButton: "marketing-widget-primary-cta-button"
3
+ root: "offer-widget",
4
+ learnMoreButton: "offer-widget-learn-more-button",
5
+ applyNowButton: "offer-widget-apply-now-button",
6
+ statusMessage: "offer-widget-status-message",
7
+ modal: "offer-widget-modal",
8
+ primaryCtaButton: "offer-widget-primary-cta-button"
9
9
  };
10
10
  export { e as offerWidgetTestIds };
@@ -3,7 +3,7 @@ var e = {
3
3
  applyNow: "Apply now",
4
4
  learnMore: "Learn more",
5
5
  primaryCta: "Start application",
6
- primaryCtaSubtext: "takes about 5 minutes",
6
+ primaryCtaSubtext: "Takes 5 minutes",
7
7
  dismissModalAriaLabel: "Close offer modal"
8
8
  };
9
9
  export { e as OFFER_WIDGET_LABELS_EN };
@@ -6,8 +6,8 @@ var e = {
6
6
  Dollar: "dollar",
7
7
  Card: "card"
8
8
  }, t = {
9
- Brand: "brand",
9
+ Info: "info",
10
10
  Warning: "warning",
11
- Danger: "danger"
11
+ Destructive: "destructive"
12
12
  };
13
13
  export { e as OfferBenefitIcon, t as OfferWidgetStatusTone };
@@ -3,28 +3,28 @@ import { OFFER_WIDGET_LABELS_EN as a } from "./index2.js";
3
3
  import { OfferBenefitItem as o } from "./index5.js";
4
4
  import { OfferWidgetHowItWorks as s } from "./index6.js";
5
5
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
6
- import { ArrowRight as u, X as d } from "lucide-react";
6
+ import { X as u } from "lucide-react";
7
7
  // ../../libs/tesouro-embedded-components-react/offer-widget/ui/dist/index7.js
8
- function f({ open: f, vspLogo: p, providedByCaption: m, primaryModalHeader: h, howItWorksHeader: g, howItWorksSteps: _, fromDayOneHeader: v, benefits: y, onClose: b, onPrimaryCtaClick: x, labels: S, testIds: C }) {
9
- let w = {
8
+ function d({ open: d, vspLogo: f, providedByCaption: p, primaryModalHeader: m, howItWorksHeader: h, howItWorksSteps: g, fromDayOneHeader: _, benefits: v, onClose: y, onPrimaryCtaClick: b, labels: x, testIds: S }) {
9
+ let C = {
10
10
  ...a,
11
- ...S
11
+ ...x
12
12
  };
13
13
  return /* @__PURE__ */ c(t, {
14
- open: f,
14
+ open: d,
15
15
  onOpenChange: (e) => {
16
- e || b();
16
+ e || y();
17
17
  },
18
18
  children: /* @__PURE__ */ l(r, {
19
- "data-testid": C?.root,
19
+ "data-testid": S?.root,
20
20
  showCloseButton: !1,
21
21
  className: "ttw:max-h-[90vh] ttw:max-w-[500px] ttw:gap-0 ttw:overflow-y-auto ttw:p-6",
22
22
  children: [
23
23
  /* @__PURE__ */ c(n, {
24
24
  className: "ttw:absolute ttw:right-4 ttw:top-4 ttw:cursor-pointer ttw:rounded-sm ttw:text-muted-foreground ttw:opacity-70 ttw:ring-offset-background ttw:transition-opacity ttw:hover:opacity-100 ttw:focus:outline-hidden ttw:focus:ring-2 ttw:focus:ring-ring ttw:focus:ring-offset-2",
25
- onClick: b,
26
- "aria-label": w.dismissModalAriaLabel,
27
- children: /* @__PURE__ */ c(d, {
25
+ onClick: y,
26
+ "aria-label": C.dismissModalAriaLabel,
27
+ children: /* @__PURE__ */ c(u, {
28
28
  className: "ttw:size-5",
29
29
  "aria-hidden": !0
30
30
  })
@@ -32,66 +32,54 @@ function f({ open: f, vspLogo: p, providedByCaption: m, primaryModalHeader: h, h
32
32
  /* @__PURE__ */ l("div", {
33
33
  className: "ttw:mb-6 ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-3",
34
34
  children: [/* @__PURE__ */ c("img", {
35
- src: p.src,
36
- alt: p.alt,
35
+ src: f.src,
36
+ alt: f.alt,
37
37
  height: 40,
38
- width: p.width,
38
+ width: f.width,
39
39
  className: "ttw:h-10 ttw:w-auto ttw:max-w-[120px] ttw:object-contain"
40
40
  }), /* @__PURE__ */ l("div", {
41
41
  className: "ttw:min-w-0",
42
42
  children: [/* @__PURE__ */ c(i, {
43
43
  className: "ttw:text-lg ttw:font-semibold ttw:leading-tight",
44
- children: h
44
+ children: m
45
45
  }), /* @__PURE__ */ c("p", {
46
46
  className: "ttw:text-sm ttw:text-muted-foreground",
47
- children: m
47
+ children: p
48
48
  })]
49
49
  })]
50
50
  }),
51
51
  /* @__PURE__ */ c(s, {
52
- header: g,
53
- steps: _
52
+ header: h,
53
+ steps: g
54
54
  }),
55
- y.length === 0 ? null : /* @__PURE__ */ l("div", {
55
+ v.length === 0 ? null : /* @__PURE__ */ l("div", {
56
56
  className: "ttw:mb-6 ttw:rounded-lg ttw:bg-muted ttw:p-[18px]",
57
57
  children: [/* @__PURE__ */ c("p", {
58
58
  className: "ttw:mb-3 ttw:text-xs ttw:font-semibold ttw:uppercase ttw:tracking-wide ttw:text-muted-foreground",
59
- children: v
59
+ children: _
60
60
  }), /* @__PURE__ */ c("div", {
61
61
  className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
62
- children: y.map((e) => /* @__PURE__ */ c(o, {
62
+ children: v.map((e) => /* @__PURE__ */ c(o, {
63
63
  text: e.text,
64
64
  icon: e.icon
65
65
  }, e.text))
66
66
  })]
67
67
  }),
68
- /* @__PURE__ */ c("div", {
69
- className: "ttw:flex ttw:justify-center",
70
- children: /* @__PURE__ */ c(e, {
68
+ /* @__PURE__ */ l("div", {
69
+ className: "ttw:flex ttw:flex-col ttw:items-center ttw:gap-2",
70
+ children: [/* @__PURE__ */ c(e, {
71
71
  type: "button",
72
- onClick: x,
73
- className: "ttw:h-auto ttw:w-full ttw:py-3",
74
- "data-testid": C?.primaryCtaButton,
75
- children: /* @__PURE__ */ l("span", {
76
- className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-center ttw:gap-x-2 ttw:whitespace-normal",
77
- children: [/* @__PURE__ */ l("span", {
78
- className: "ttw:flex ttw:items-center ttw:gap-2",
79
- children: [/* @__PURE__ */ c("span", {
80
- className: "ttw:font-semibold",
81
- children: w.primaryCta
82
- }), /* @__PURE__ */ c(u, {
83
- className: "ttw:size-4",
84
- "aria-hidden": !0
85
- })]
86
- }), /* @__PURE__ */ c("span", {
87
- className: "ttw:text-sm ttw:font-normal ttw:opacity-90",
88
- children: w.primaryCtaSubtext
89
- })]
90
- })
91
- })
72
+ onClick: b,
73
+ className: "ttw:w-full",
74
+ "data-testid": S?.primaryCtaButton,
75
+ children: C.primaryCta
76
+ }), /* @__PURE__ */ c("p", {
77
+ className: "ttw:text-sm ttw:text-muted-foreground",
78
+ children: C.primaryCtaSubtext
79
+ })]
92
80
  })
93
81
  ]
94
82
  })
95
83
  });
96
84
  }
97
- export { f as OfferWidgetModal };
85
+ export { d as OfferWidgetModal };
@@ -1,35 +1,26 @@
1
- import { Badge as e, cn as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { OfferWidgetStatusTone as n } from "./index3.js";
3
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
1
+ import { Badge as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
4
3
  // ../../libs/tesouro-embedded-components-react/offer-widget/ui/dist/index8.js
5
- var a = {
6
- [n.Brand]: "ttw:border-transparent ttw:bg-primary/10 ttw:text-primary",
7
- [n.Warning]: "ttw:border-amber-100 ttw:bg-amber-100 ttw:text-amber-700",
8
- [n.Danger]: "ttw:border-destructive/20 ttw:bg-destructive/20 ttw:text-destructive"
9
- };
10
- function o({ statusMessage: n, testId: o }) {
11
- let { chipLabel: s, chipTone: c, heading: l, body: u } = n;
12
- return /* @__PURE__ */ i("div", {
13
- "data-testid": o,
4
+ function r({ statusMessage: r, testId: i }) {
5
+ let { chipLabel: a, chipTone: o, heading: s, body: c } = r;
6
+ return /* @__PURE__ */ n("div", {
7
+ "data-testid": i,
14
8
  className: "ttw:flex ttw:flex-col ttw:items-start",
15
9
  children: [
16
- /* @__PURE__ */ i(e, {
17
- variant: "outline",
18
- className: t("ttw:mb-2 ttw:gap-2 ttw:rounded-full ttw:px-3 ttw:py-1 ttw:text-sm", a[c]),
19
- children: [/* @__PURE__ */ r("span", {
20
- "aria-hidden": "true",
21
- className: "ttw:size-2 ttw:rounded-full ttw:bg-current"
22
- }), s]
10
+ /* @__PURE__ */ t(e, {
11
+ tone: o,
12
+ className: "ttw:mb-2",
13
+ children: a
23
14
  }),
24
- l ? /* @__PURE__ */ r("p", {
15
+ s ? /* @__PURE__ */ t("p", {
25
16
  className: "ttw:text-xl ttw:font-semibold ttw:text-primary",
26
- children: l
17
+ children: s
27
18
  }) : null,
28
- u.map((e) => /* @__PURE__ */ r("p", {
19
+ c.map((e) => /* @__PURE__ */ t("p", {
29
20
  className: "ttw:mt-1 ttw:text-sm ttw:text-muted-foreground",
30
21
  children: e
31
22
  }, e))
32
23
  ]
33
24
  });
34
25
  }
35
- export { o as OfferWidgetStatus };
26
+ export { r as OfferWidgetStatus };
@@ -2,7 +2,7 @@
2
2
  var e = "widget-disclosures-required", t = /* @__PURE__ */ new Set([
3
3
  "accept_disclosures",
4
4
  "onboarding",
5
- "marketing",
5
+ "offer",
6
6
  "widget_suite",
7
7
  "banking_compliance_banner"
8
8
  ]);
@@ -1,5 +1,5 @@
1
1
  // ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
2
- var e = "@tesouro/embedded-components-react", t = "0.11.63", n = "db8b0318fa3e04dbff0d585213b60c4858acad2b", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.11.65", n = "03e89f32e1af1addc522537c8223e8d1d2d561e8", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.11.63",
3
+ "version": "0.11.65",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": [