@usgb/forms 1.0.0 → 1.0.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.
package/dist/index.js CHANGED
@@ -3,19 +3,19 @@ import { validate as te } from "email-validator";
3
3
  import { useId as ne, useMemo as P, useState as ie, useEffect as re, forwardRef as O } from "react";
4
4
  import { useForm as oe } from "react-hook-form";
5
5
  import x from "classnames";
6
- const se = "1.0.0", ae = { version: "1.0.0", transport: "server-proxy", payloadShape: "data-and-context" }, le = { page_url: { destination: "form_submission_url", category: "page", collection: "server", required: !0, states: ["collected", "unavailable"], description: "Canonical landing-page URL at submission time" }, page_title: { destination: "pageName", category: "page", collection: "server", required: !1, states: ["collected", "unavailable"] }, referrer: { destination: "referrer", category: "page", collection: "browser", required: !1, states: ["collected", "unavailable"] }, first_touch_url: { destination: "crossDomain_landing_url", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_source: { destination: "utm_source", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_medium: { destination: "utm_medium", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_campaign: { destination: "utm_campaign", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_term: { destination: "utm_term", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_content: { destination: "utm_content", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, gclid: { destination: "gclid", category: "click-id", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, msclkid: { destination: "msclkid", category: "click-id", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, gbraid: { destination: "gbraid", category: "click-id", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, wbraid: { destination: "wbraid", category: "click-id", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, hubspot_utk: { destination: "hubspot_utk", category: "identity", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, ga_client_id: { destination: "ga_client_id", category: "analytics", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, ga_session_id: { destination: "session_id_start", category: "analytics", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, snowplow_id: { destination: "snowplow_id", category: "analytics", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, vwo_uuid: { destination: "vwo_uuid", category: "experiment", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, user_agent: { destination: "header_http_client_details", category: "technical", collection: "server", required: !1, states: ["collected", "unavailable"] }, ip_address: { destination: "ipAddress", category: "technical", collection: "server", required: !1, states: ["collected", "unavailable"] } }, ce = { "main-investors-kit": { definitionVersion: "1", kind: "lead", flow: { type: "single" }, supportedHosts: ["pwa", "wordpress"], fields: [{ name: "firstname", required: !0, group: "name" }, { name: "lastname", required: !0, group: "name" }, { name: "email", required: !0 }, { name: "phone", required: !1 }], trackingFields: ["page_url", "page_title", "referrer", "first_touch_url", "utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content", "gclid", "msclkid", "gbraid", "wbraid", "hubspot_utk", "ga_client_id", "ga_session_id", "snowplow_id", "vwo_uuid", "user_agent", "ip_address"], consent: { definitionId: "lead-tcpa", definitionVersion: "1", required: !0, submitFields: ["tcpa_form_consent_granted", "tcpa_form_opt_in_date"] }, editor: { label: "Main Investors Kit", description: "Standard lead form: name, email, phone, TCPA consent. Use on full-width landing pages and PWA kit/sidebar placements.", whenToUse: "Default kit request. Do not use for affiliate landers or IRA-specific leads.", whenNotToUse: "Affiliate pages (separate definition). IRA kit (separate definition when added).", supportedAppearances: ["light", "navy"], supportedVariants: ["dense", "large", "sidebar", "two-column"] } }, newsletter: { definitionVersion: "1", kind: "newsletter", flow: { type: "single" }, supportedHosts: ["pwa"], fields: [{ name: "email", required: !0 }], trackingFields: ["page_url", "page_title", "referrer", "utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content"], editor: { label: "Newsletter", description: "Email-only newsletter signup. No TCPA consent.", whenToUse: "Footer or landing newsletter capture where only an email is required.", whenNotToUse: "Lead kits that need name, phone, or TCPA consent.", supportedAppearances: ["light", "navy"], supportedVariants: [] } } }, de = { hosts: ["pwa", "wordpress"], mayProvide: ["browser cookies", "URL parameters", "page and placement context", "host/store identity"], mustNotDefine: ["new tracking keys", "destination property names", "consent definitions", "form fields", "submission endpoints"] }, ue = {
6
+ const se = "1.0.0", ae = { version: "1.0.0", transport: "server-proxy", payloadShape: "data-and-context" }, le = { page_url: { destination: "form_submission_url", category: "page", collection: "server", required: !0, states: ["collected", "unavailable"], description: "Canonical landing-page URL at submission time" }, page_title: { destination: "pageName", category: "page", collection: "server", required: !1, states: ["collected", "unavailable"] }, referrer: { destination: "referrer", category: "page", collection: "browser", required: !1, states: ["collected", "unavailable"] }, first_touch_url: { destination: "crossDomain_landing_url", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_source: { destination: "utm_source", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_medium: { destination: "utm_medium", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_campaign: { destination: "utm_campaign", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_term: { destination: "utm_term", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_content: { destination: "utm_content", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, gclid: { destination: "gclid", category: "click-id", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, msclkid: { destination: "msclkid", category: "click-id", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, gbraid: { destination: "gbraid", category: "click-id", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, wbraid: { destination: "wbraid", category: "click-id", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, hubspot_utk: { destination: "hubspot_utk", category: "identity", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, ga_client_id: { destination: "ga_client_id", category: "analytics", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, ga_session_id: { destination: "session_id_start", category: "analytics", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, snowplow_id: { destination: "snowplow_id", category: "analytics", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, vwo_uuid: { destination: "vwo_uuid", category: "experiment", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, user_agent: { destination: "header_http_client_details", category: "technical", collection: "server", required: !1, states: ["collected", "unavailable"] }, ip_address: { destination: "ipAddress", category: "technical", collection: "server", required: !1, states: ["collected", "unavailable"] } }, ce = { "main-investors-kit": { definitionVersion: "1", kind: "lead", flow: { type: "single" }, supportedHosts: ["pwa", "wordpress"], fields: [{ name: "firstname", required: !0, group: "name" }, { name: "lastname", required: !0, group: "name" }, { name: "email", required: !0 }, { name: "phone", required: !1 }], trackingFields: ["page_url", "page_title", "referrer", "first_touch_url", "utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content", "gclid", "msclkid", "gbraid", "wbraid", "hubspot_utk", "ga_client_id", "ga_session_id", "snowplow_id", "vwo_uuid", "user_agent", "ip_address"], ctaLabel: "GET MY FREE GUIDE", consent: { definitionId: "lead-tcpa", definitionVersion: "1", required: !0, submitFields: ["tcpa_form_consent_granted", "tcpa_form_opt_in_date"] }, editor: { label: "Main Investors Kit", description: "Standard lead form: name, email, phone, TCPA consent. Use on full-width landing pages and PWA kit/sidebar placements.", whenToUse: "Default kit request. Do not use for affiliate landers or IRA-specific leads.", whenNotToUse: "Affiliate pages (separate definition). IRA kit (separate definition when added).", supportedAppearances: ["on-light", "on-dark"], supportedVariants: ["dense", "large", "sidebar", "two-column"] } }, newsletter: { definitionVersion: "1", kind: "newsletter", flow: { type: "single" }, supportedHosts: ["pwa"], fields: [{ name: "email", required: !0 }], trackingFields: ["page_url", "page_title", "referrer", "utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content"], ctaLabel: "SUBSCRIBE", editor: { label: "Newsletter", description: "Email-only newsletter signup. No TCPA consent.", whenToUse: "Footer or landing newsletter capture where only an email is required.", whenNotToUse: "Lead kits that need name, phone, or TCPA consent.", supportedAppearances: ["on-light", "on-dark"], supportedVariants: [] } } }, de = { hosts: ["pwa", "wordpress"], mayProvide: ["browser cookies", "URL parameters", "page and placement context", "host/store identity"], mustNotDefine: ["new tracking keys", "destination property names", "consent definitions", "form fields", "submission endpoints"] }, ue = {
7
7
  schemaVersion: se,
8
8
  package: { name: "@usgb/forms", compatiblePackageVersions: "^1.0.0" },
9
9
  submissionContract: ae,
10
10
  trackingRegistry: le,
11
11
  forms: ce,
12
12
  hostAdapterContract: de
13
- }, D = ue;
13
+ }, A = ue;
14
14
  function me(t) {
15
- return D.forms[t];
15
+ return A.forms[t];
16
16
  }
17
17
  function Me() {
18
- return Object.entries(D.forms).map(([t, e]) => ({
18
+ return Object.entries(A.forms).map(([t, e]) => ({
19
19
  formId: t,
20
20
  definition: e
21
21
  }));
@@ -23,7 +23,7 @@ function Me() {
23
23
  function fe(t, e) {
24
24
  return typeof t == "function" ? t(e) : t;
25
25
  }
26
- const U = {
26
+ const D = {
27
27
  definitionId: "lead-tcpa",
28
28
  definitionVersion: "1",
29
29
  requiredLegalUrls: ["clientAgreement", "privacyPolicy"],
@@ -127,7 +127,7 @@ const U = {
127
127
  }
128
128
  ]
129
129
  }, ge = {
130
- [`${U.definitionId}@${U.definitionVersion}`]: U,
130
+ [`${D.definitionId}@${D.definitionVersion}`]: D,
131
131
  [`${$.definitionId}@${$.definitionVersion}`]: $
132
132
  };
133
133
  function Z(t, e) {
@@ -217,7 +217,7 @@ const _e = [
217
217
  function L(t, e) {
218
218
  return t === "collected" && e != null && e !== "" ? { status: "collected", value: e } : { status: t };
219
219
  }
220
- function we(t) {
220
+ function ke(t) {
221
221
  const { trackingFields: e, trackingRegistry: n, adapter: o } = t, l = o.getTrackingHints(), a = {};
222
222
  for (const i of e) {
223
223
  const r = n[i];
@@ -248,7 +248,7 @@ function we(t) {
248
248
  }
249
249
  return a;
250
250
  }
251
- function ke() {
251
+ function we() {
252
252
  return typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : `usgb-${Date.now()}-${Math.random().toString(36).slice(2, 10)}`;
253
253
  }
254
254
  function ye(t, e) {
@@ -275,38 +275,38 @@ function ve({
275
275
  onAccepted: c,
276
276
  onFailed: d
277
277
  }) {
278
- const f = ne(), h = e.consent, w = h ? Z(
278
+ const f = ne(), h = e.consent, k = h ? Z(
279
279
  h.definitionId,
280
280
  h.definitionVersion
281
281
  ) : void 0, g = P(
282
- () => (w == null ? void 0 : w.items.filter(
282
+ () => (k == null ? void 0 : k.items.filter(
283
283
  (_) => _.type === "checkbox"
284
284
  )) ?? [],
285
- [w]
286
- ), k = P(
285
+ [k]
286
+ ), w = P(
287
287
  () => g.map((_) => _.name),
288
288
  [g]
289
- ), u = P(
290
- () => ye(e.fields, k),
291
- [e.fields, k]
289
+ ), m = P(
290
+ () => ye(e.fields, w),
291
+ [e.fields, w]
292
292
  ), {
293
- register: m,
293
+ register: u,
294
294
  handleSubmit: N,
295
295
  formState: { errors: b }
296
296
  } = oe({
297
- defaultValues: u
297
+ defaultValues: m
298
298
  }), [q, C] = ie({ kind: "idle" });
299
299
  re(() => {
300
300
  r == null || r({ type: "view", formId: t });
301
301
  }, [r, t]);
302
- const T = P(() => {
302
+ const I = P(() => {
303
303
  const _ = {};
304
304
  for (const S of e.fields)
305
305
  _[S.name] = `${f}-${S.name}`;
306
- for (const S of k)
306
+ for (const S of w)
307
307
  _[S] = `${f}-${S}`;
308
308
  return _;
309
- }, [f, e.fields, k]), I = N(async (_) => {
309
+ }, [f, e.fields, w]), T = N(async (_) => {
310
310
  const S = Object.keys(b);
311
311
  if (S.length) {
312
312
  r == null || r({
@@ -317,9 +317,9 @@ function ve({
317
317
  return;
318
318
  }
319
319
  r == null || r({ type: "submit_attempt", formId: t }), C({ kind: "submitting" });
320
- const W = /* @__PURE__ */ new Date(), G = W.toISOString().slice(0, 10), ee = we({
320
+ const W = /* @__PURE__ */ new Date(), G = W.toISOString().slice(0, 10), ee = ke({
321
321
  trackingFields: e.trackingFields,
322
- trackingRegistry: D.trackingRegistry,
322
+ trackingRegistry: A.trackingRegistry,
323
323
  adapter: i
324
324
  }), E = {};
325
325
  for (const y of e.fields) {
@@ -328,11 +328,11 @@ function ve({
328
328
  E[y.name] = !!v;
329
329
  continue;
330
330
  }
331
- const A = j(y.name);
332
- E[y.name] = A != null && A.serialize ? A.serialize(v) : v.trim();
331
+ const V = j(y.name);
332
+ E[y.name] = V != null && V.serialize ? V.serialize(v) : v.trim();
333
333
  }
334
334
  let H;
335
- if (h && w) {
335
+ if (h && k) {
336
336
  const y = {};
337
337
  for (const v of g)
338
338
  y[v.name] = !!_[v.name], E[v.name] = !!_[v.name];
@@ -345,11 +345,11 @@ function ve({
345
345
  placement: n || e.kind
346
346
  };
347
347
  }
348
- const V = {
348
+ const U = {
349
349
  formId: t,
350
350
  definitionVersion: e.definitionVersion,
351
- submissionContractVersion: D.submissionContract.version,
352
- idempotencyKey: ke(),
351
+ submissionContractVersion: A.submissionContract.version,
352
+ idempotencyKey: we(),
353
353
  data: E,
354
354
  consent: H,
355
355
  context: {
@@ -361,9 +361,9 @@ function ve({
361
361
  }
362
362
  };
363
363
  try {
364
- const y = await i.submit(V);
364
+ const y = await i.submit(U);
365
365
  if (y.status === "accepted") {
366
- r == null || r({ type: "success", formId: t, status: "accepted" }), c == null || c(V), C({ kind: "accepted" });
366
+ r == null || r({ type: "success", formId: t, status: "accepted" }), c == null || c(U), C({ kind: "accepted" });
367
367
  const v = M(a);
368
368
  v && typeof window < "u" && window.location.assign(v);
369
369
  } else
@@ -374,20 +374,20 @@ function ve({
374
374
  type: "failure",
375
375
  formId: t,
376
376
  message: y.message
377
- }), d == null || d(V, y.message);
377
+ }), d == null || d(U, y.message);
378
378
  } catch (y) {
379
379
  const v = y instanceof Error ? y.message : "Submission failed";
380
- C({ kind: "failed", message: v }), r == null || r({ type: "failure", formId: t, message: v }), d == null || d(V, v);
380
+ C({ kind: "failed", message: v }), r == null || r({ type: "failure", formId: t, message: v }), d == null || d(U, v);
381
381
  }
382
382
  });
383
383
  return {
384
- register: m,
384
+ register: u,
385
385
  errors: b,
386
- fieldIds: T,
387
- consentDef: w,
386
+ fieldIds: I,
387
+ consentDef: k,
388
388
  consentCheckboxes: g,
389
389
  uiState: q,
390
- onSubmit: I
390
+ onSubmit: T
391
391
  };
392
392
  }
393
393
  function Ce() {
@@ -571,8 +571,8 @@ const Pe = O(
571
571
  className: d,
572
572
  placeholder: f,
573
573
  ...h
574
- }, w) {
575
- const g = l ? `${e}-error` : void 0, k = i ? `${n}${a ? "*" : ""}` : f, u = i && k ? r === "title" ? Fe(k) : k.toUpperCase() : k;
574
+ }, k) {
575
+ const g = l ? `${e}-error` : void 0, w = i ? `${n}${a ? "*" : ""}` : f, m = i && w ? r === "title" ? Fe(w) : w.toUpperCase() : w;
576
576
  return /* @__PURE__ */ p("div", { className: "usgb-form-group", children: [
577
577
  /* @__PURE__ */ s(
578
578
  Ee,
@@ -586,7 +586,7 @@ const Pe = O(
586
586
  /* @__PURE__ */ s(
587
587
  "input",
588
588
  {
589
- ref: w,
589
+ ref: k,
590
590
  id: e,
591
591
  type: o,
592
592
  className: x(
@@ -594,7 +594,7 @@ const Pe = O(
594
594
  l && "usgb-field-invalid",
595
595
  d
596
596
  ),
597
- placeholder: u,
597
+ placeholder: m,
598
598
  "aria-invalid": l ? !0 : void 0,
599
599
  "aria-describedby": g,
600
600
  "aria-required": a || void 0,
@@ -648,65 +648,65 @@ function xe({
648
648
  const { register: a, errors: i, fieldIds: r, consentDef: c, uiState: d, onSubmit: f } = l, h = P(
649
649
  () => Le(t.fields),
650
650
  [t.fields]
651
- ), w = e.includes("sidebar"), g = e.includes("dense") || w, k = w ? "title" : "upper";
651
+ ), k = e.includes("sidebar"), g = e.includes("dense") || k, w = k ? "title" : "upper";
652
652
  return /* @__PURE__ */ p("form", { onSubmit: f, noValidate: !0, children: [
653
- h.map((u) => u.type === "group" ? /* @__PURE__ */ s(
653
+ h.map((m) => m.type === "group" ? /* @__PURE__ */ s(
654
654
  "div",
655
655
  {
656
656
  className: "usgb-form-grid",
657
- children: u.fields.map((m) => /* @__PURE__ */ s(
657
+ children: m.fields.map((u) => /* @__PURE__ */ s(
658
658
  B,
659
659
  {
660
- fieldRef: m,
660
+ fieldRef: u,
661
661
  fieldIds: r,
662
662
  register: a,
663
663
  errors: i,
664
664
  hideLabel: g,
665
- placeholderCase: k
665
+ placeholderCase: w
666
666
  },
667
- m.name
667
+ u.name
668
668
  ))
669
669
  },
670
- `group-${u.group}-${u.fields.map((m) => m.name).join("-")}`
670
+ `group-${m.group}-${m.fields.map((u) => u.name).join("-")}`
671
671
  ) : /* @__PURE__ */ s(
672
672
  B,
673
673
  {
674
- fieldRef: u.field,
674
+ fieldRef: m.field,
675
675
  fieldIds: r,
676
676
  register: a,
677
677
  errors: i,
678
678
  hideLabel: g,
679
- placeholderCase: k
679
+ placeholderCase: w
680
680
  },
681
- u.field.name
681
+ m.field.name
682
682
  )),
683
- c && Ne(o, c.requiredLegalUrls) ? c.items.map((u, m) => {
683
+ c && Ne(o, c.requiredLegalUrls) ? c.items.map((m, u) => {
684
684
  const N = fe(
685
- u.content,
685
+ m.content,
686
686
  o
687
687
  );
688
- if (u.type === "notice")
688
+ if (m.type === "notice")
689
689
  return /* @__PURE__ */ s(
690
690
  "p",
691
691
  {
692
692
  className: "usgb-consent-copy usgb-consent-notice",
693
693
  children: N
694
694
  },
695
- `notice-${m}`
695
+ `notice-${u}`
696
696
  );
697
- const b = i[u.name], q = typeof (b == null ? void 0 : b.message) == "string" ? b.message : void 0;
697
+ const b = i[m.name], q = typeof (b == null ? void 0 : b.message) == "string" ? b.message : void 0;
698
698
  return /* @__PURE__ */ s(
699
699
  qe,
700
700
  {
701
- id: r[u.name],
701
+ id: r[m.name],
702
702
  label: N,
703
- required: u.required,
703
+ required: m.required,
704
704
  errorMessage: q,
705
- ...a(u.name, {
706
- required: u.required ? "This field is required" : !1
705
+ ...a(m.name, {
706
+ required: m.required ? "This field is required" : !1
707
707
  })
708
708
  },
709
- u.name
709
+ m.name
710
710
  );
711
711
  }) : null,
712
712
  /* @__PURE__ */ s(Q, { type: "submit", loading: d.kind === "submitting", children: n }),
@@ -720,7 +720,7 @@ function xe({
720
720
  ) : null
721
721
  ] });
722
722
  }
723
- function Te({
723
+ function Ie({
724
724
  definition: t,
725
725
  ctaLabel: e,
726
726
  session: n
@@ -762,8 +762,8 @@ function Te({
762
762
  }
763
763
  const X = {
764
764
  lead: xe,
765
- newsletter: Te
766
- }, Ie = "Thank you. Your request has been accepted and is being processed.";
765
+ newsletter: Ie
766
+ }, Te = "Thank you. Your request has been accepted and is being processed.";
767
767
  function F({
768
768
  className: t,
769
769
  appearance: e,
@@ -782,24 +782,24 @@ function F({
782
782
  }
783
783
  );
784
784
  }
785
- function Ve({
785
+ function Ue({
786
786
  formId: t,
787
787
  definition: e,
788
788
  appearance: n,
789
789
  variants: o,
790
790
  variantValue: l,
791
791
  heading: a,
792
- body: i,
792
+ subheading: i,
793
793
  ctaLabel: r,
794
794
  source: c,
795
795
  campaign: d,
796
796
  legalUrls: f,
797
797
  successMessage: h,
798
- successUrl: w,
798
+ successUrl: k,
799
799
  adapter: g,
800
- analytics: k,
801
- className: u,
802
- onAccepted: m,
800
+ analytics: w,
801
+ className: m,
802
+ onAccepted: u,
803
803
  onFailed: N
804
804
  }) {
805
805
  const b = ve({
@@ -808,18 +808,18 @@ function Ve({
808
808
  variantValue: l,
809
809
  source: c,
810
810
  campaign: d,
811
- successUrl: w,
811
+ successUrl: k,
812
812
  adapter: g,
813
- analytics: k,
814
- onAccepted: m,
813
+ analytics: w,
814
+ onAccepted: u,
815
815
  onFailed: N
816
816
  });
817
817
  if (b.uiState.kind === "accepted") {
818
- const C = !!M(w);
818
+ const C = !!M(k);
819
819
  return /* @__PURE__ */ p(
820
820
  R,
821
821
  {
822
- className: u,
822
+ className: m,
823
823
  appearance: n,
824
824
  variantValue: l,
825
825
  kind: e.kind,
@@ -830,7 +830,7 @@ function Ve({
830
830
  {
831
831
  className: "usgb-form-status usgb-form-status-success",
832
832
  role: "status",
833
- children: M(h) ?? Ie
833
+ children: M(h) ?? Te
834
834
  }
835
835
  )
836
836
  ]
@@ -841,13 +841,13 @@ function Ve({
841
841
  return /* @__PURE__ */ p(
842
842
  R,
843
843
  {
844
- className: u,
844
+ className: m,
845
845
  appearance: n,
846
846
  variantValue: l,
847
847
  kind: e.kind,
848
848
  children: [
849
849
  a ? /* @__PURE__ */ s("h2", { className: "usgb-form-heading", children: a }) : null,
850
- i ? /* @__PURE__ */ s("p", { className: "usgb-form-body", children: i }) : null,
850
+ i ? /* @__PURE__ */ s("p", { className: "usgb-form-subheading", children: i }) : null,
851
851
  /* @__PURE__ */ s(
852
852
  q,
853
853
  {
@@ -864,24 +864,24 @@ function Ve({
864
864
  }
865
865
  function Oe({
866
866
  formId: t,
867
- appearance: e = "light",
867
+ appearance: e = "on-light",
868
868
  variants: n = ["dense"],
869
869
  heading: o,
870
- body: l,
871
- ctaLabel: a = "GET MY FREE GUIDE",
870
+ subheading: l,
871
+ ctaLabel: a,
872
872
  source: i,
873
873
  campaign: r,
874
874
  legalUrls: c,
875
875
  successMessage: d,
876
876
  successUrl: f,
877
877
  adapter: h,
878
- analytics: w,
878
+ analytics: k,
879
879
  className: g,
880
- onAccepted: k,
881
- onFailed: u
880
+ onAccepted: w,
881
+ onFailed: m
882
882
  }) {
883
- const m = me(t), b = (m == null ? void 0 : m.kind) === "newsletter" ? "" : n.join(" ");
884
- if (!m)
883
+ const u = me(t), b = (u == null ? void 0 : u.kind) === "newsletter" ? "" : n.join(" ");
884
+ if (!u)
885
885
  return /* @__PURE__ */ p(
886
886
  F,
887
887
  {
@@ -894,7 +894,7 @@ function Oe({
894
894
  ]
895
895
  }
896
896
  );
897
- const q = m.consent, C = q ? Z(
897
+ const q = u.consent, C = q ? Z(
898
898
  q.definitionId,
899
899
  q.definitionVersion
900
900
  ) : void 0;
@@ -905,74 +905,74 @@ function Oe({
905
905
  className: g,
906
906
  appearance: e,
907
907
  variantValue: b,
908
- kind: m.kind,
908
+ kind: u.kind,
909
909
  children: [
910
910
  "Missing consent definition for ",
911
911
  t
912
912
  ]
913
913
  }
914
914
  );
915
- const T = (C == null ? void 0 : C.requiredLegalUrls.filter(
915
+ const I = (C == null ? void 0 : C.requiredLegalUrls.filter(
916
916
  (_) => {
917
917
  var S;
918
918
  return !((S = c == null ? void 0 : c[_]) != null && S.trim());
919
919
  }
920
920
  )) ?? [];
921
- if (C && T.length)
921
+ if (C && I.length)
922
922
  return /* @__PURE__ */ p(
923
923
  F,
924
924
  {
925
925
  className: g,
926
926
  appearance: e,
927
927
  variantValue: b,
928
- kind: m.kind,
928
+ kind: u.kind,
929
929
  children: [
930
930
  "Missing legal URL(s) for ",
931
931
  t,
932
932
  ": ",
933
- T.join(", ")
933
+ I.join(", ")
934
934
  ]
935
935
  }
936
936
  );
937
- const I = m.fields.filter(
937
+ const T = u.fields.filter(
938
938
  (_) => !j(_.name)
939
939
  );
940
- return I.length ? /* @__PURE__ */ p(
940
+ return T.length ? /* @__PURE__ */ p(
941
941
  F,
942
942
  {
943
943
  className: g,
944
944
  appearance: e,
945
945
  variantValue: b,
946
- kind: m.kind,
946
+ kind: u.kind,
947
947
  children: [
948
948
  "Unknown field(s) in ",
949
949
  t,
950
950
  ":",
951
951
  " ",
952
- I.map((_) => _.name).join(", ")
952
+ T.map((_) => _.name).join(", ")
953
953
  ]
954
954
  }
955
- ) : m.kind in X ? /* @__PURE__ */ s(
956
- Ve,
955
+ ) : u.kind in X ? /* @__PURE__ */ s(
956
+ Ue,
957
957
  {
958
958
  formId: t,
959
- definition: m,
959
+ definition: u,
960
960
  appearance: e,
961
961
  variants: n,
962
962
  variantValue: b,
963
963
  heading: o,
964
- body: l,
965
- ctaLabel: a,
964
+ subheading: l,
965
+ ctaLabel: a ?? u.ctaLabel,
966
966
  source: i,
967
967
  campaign: r,
968
968
  legalUrls: c,
969
969
  successMessage: d,
970
970
  successUrl: f,
971
971
  adapter: h,
972
- analytics: w,
972
+ analytics: k,
973
973
  className: g,
974
- onAccepted: k,
975
- onFailed: u
974
+ onAccepted: w,
975
+ onFailed: m
976
976
  }
977
977
  ) : /* @__PURE__ */ p(
978
978
  F,
@@ -980,10 +980,10 @@ function Oe({
980
980
  className: g,
981
981
  appearance: e,
982
982
  variantValue: b,
983
- kind: m.kind,
983
+ kind: u.kind,
984
984
  children: [
985
985
  "Missing renderer for kind: ",
986
- m.kind
986
+ u.kind
987
987
  ]
988
988
  }
989
989
  );
@@ -1020,14 +1020,14 @@ export {
1020
1020
  K as FieldError,
1021
1021
  Ee as FieldLabel,
1022
1022
  $ as LEAD_CLICKWRAP_V1,
1023
- U as LEAD_TCPA_V1,
1023
+ D as LEAD_TCPA_V1,
1024
1024
  Be as PWA_LEGAL_URLS,
1025
1025
  Pe as TextField,
1026
1026
  Oe as UsgbForm,
1027
- we as collectTrackingContext,
1028
- ke as createIdempotencyKey,
1027
+ ke as collectTrackingContext,
1028
+ we as createIdempotencyKey,
1029
1029
  je as createStubAdapter,
1030
- D as formsManifest,
1030
+ A as formsManifest,
1031
1031
  Z as getConsentDefinition,
1032
1032
  j as getFieldDefinition,
1033
1033
  me as getFormDefinition,
@@ -65,7 +65,7 @@ export interface HostAdapter {
65
65
  /** Optional — used by multi-step flow later. */
66
66
  submitStep?(stepId: string, payload: SubmissionPayload): Promise<SubmitResult>;
67
67
  }
68
- export type FormAppearance = 'light' | 'navy';
68
+ export type FormAppearance = 'on-light' | 'on-dark';
69
69
  export type FormVariant = 'dense' | 'large' | 'sidebar' | 'two-column';
70
70
  export type FormAnalyticsEvent = {
71
71
  type: 'view';
@@ -1 +1 @@
1
- {"version":3,"file":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,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,YAAY,CAAC,CAAA;CAC3B;AAED,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,SAAS,CAAA;AAEnD,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,YAAY,CAAA;AAEtE,MAAM,MAAM,kBAAkB,GACxB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,oBAAoB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,GAChE;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAC1C;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,UAAU,CAAA;CAAE,GACvD;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAE3D,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAA"}
@@ -12,7 +12,7 @@ export interface FormEditorMeta {
12
12
  description: string;
13
13
  whenToUse: string;
14
14
  whenNotToUse: string;
15
- supportedAppearances: Array<'light' | 'navy'>;
15
+ supportedAppearances: Array<'on-light' | 'on-dark'>;
16
16
  supportedVariants: Array<'dense' | 'large' | 'sidebar' | 'two-column'>;
17
17
  }
18
18
  export interface FormConsentDefinition {
@@ -53,6 +53,11 @@ export interface FormDefinition {
53
53
  fields: FormFieldRef[];
54
54
  trackingFields: string[];
55
55
  consent?: FormConsentDefinition;
56
+ /**
57
+ * Package default submit label. Hosts override with `ctaLabel` (React)
58
+ * or `cta` (Web Component).
59
+ */
60
+ ctaLabel: string;
56
61
  editor: FormEditorMeta;
57
62
  }
58
63
  export interface FormsManifest {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/definitions/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,cAAc,GAAG,QAAQ,CAAA;AAEtE,MAAM,WAAW,qBAAqB;IAClC,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,kBAAkB,CAAA;IAC9B,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE,KAAK,CAAC,WAAW,GAAG,aAAa,GAAG,kBAAkB,CAAC,CAAA;IAC/D,WAAW,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,cAAc;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;IACpB,oBAAoB,EAAE,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC,CAAA;IAC7C,iBAAiB,EAAE,KAAK,CAAC,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,YAAY,CAAC,CAAA;CACzE;AAED,MAAM,WAAW,qBAAqB;IAClC,YAAY,EAAE,MAAM,CAAA;IACpB,iBAAiB,EAAE,MAAM,CAAA;IACzB,QAAQ,EAAE,OAAO,CAAA;IACjB,YAAY,EAAE,MAAM,EAAE,CAAA;CACzB;AAED,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,YAAY,CAAA;AAE5C,MAAM,MAAM,cAAc,GAAG,MAAM,CAAA;AAEnC,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,cAAc,CAAA;CACzB;AAED,MAAM,MAAM,QAAQ,GACd;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IACI,IA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;CACL,CAAA;AAEP;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC3B,+EAA+E;IAC/E,iBAAiB,EAAE,MAAM,CAAA;IACzB,uEAAuE;IACvE,IAAI,EAAE,QAAQ,CAAA;IACd,IAAI,EAAE,QAAQ,CAAA;IACd,cAAc,EAAE,KAAK,CAAC,KAAK,GAAG,WAAW,CAAC,CAAA;IAC1C,MAAM,EAAE,YAAY,EAAE,CAAA;IACtB,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,OAAO,CAAC,EAAE,qBAAqB,CAAA;IAC/B;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,cAAc,CAAA;CACzB;AAED,MAAM,WAAW,aAAa;IAC1B,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE;QACL,IAAI,EAAE,MAAM,CAAA;QACZ,yBAAyB,EAAE,MAAM,CAAA;KACpC,CAAA;IACD,kBAAkB,EAAE;QAChB,OAAO,EAAE,MAAM,CAAA;QACf,SAAS,EAAE,cAAc,CAAA;QACzB,YAAY,EAAE,kBAAkB,CAAA;KACnC,CAAA;IACD,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAA;IACvD,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;IACrC,mBAAmB,EAAE;QACjB,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,WAAW,CAAC,CAAA;QACjC,UAAU,EAAE,MAAM,EAAE,CAAA;QACpB,aAAa,EAAE,MAAM,EAAE,CAAA;KAC1B,CAAA;CACJ"}
@@ -5,7 +5,7 @@ export interface UsgbFormProps {
5
5
  appearance?: FormAppearance;
6
6
  variants?: FormVariant[];
7
7
  heading?: string;
8
- body?: string;
8
+ subheading?: string;
9
9
  ctaLabel?: string;
10
10
  source?: string;
11
11
  campaign?: string;
@@ -21,5 +21,5 @@ export interface UsgbFormProps {
21
21
  onAccepted?: (payload: SubmissionPayload) => void;
22
22
  onFailed?: (payload: SubmissionPayload, message?: string) => void;
23
23
  }
24
- export declare function UsgbForm({ formId, appearance, variants, heading, body, ctaLabel, source, campaign, legalUrls, successMessage, successUrl, adapter, analytics, className, onAccepted, onFailed }: Readonly<UsgbFormProps>): React.ReactElement;
24
+ export declare function UsgbForm({ formId, appearance, variants, heading, subheading, ctaLabel, source, campaign, legalUrls, successMessage, successUrl, adapter, analytics, className, onAccepted, onFailed }: Readonly<UsgbFormProps>): React.ReactElement;
25
25
  //# sourceMappingURL=UsgbForm.d.ts.map