@tesouro/embedded-components-react 0.5.36 → 0.5.38

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 (50) hide show
  1. package/README.md +14 -14
  2. package/dist/index.d.ts +41 -3
  3. package/dist/index.js +5 -5
  4. package/dist/lib/BankAccountOnboardingWidget.d.ts +41 -3
  5. package/dist/lib/BankAccountOnboardingWidget.js +5 -5
  6. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index10.js +184 -109
  8. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index11.js +29 -174
  9. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index12.js +117 -67
  10. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index13.js +137 -44
  11. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index14.js +77 -107
  12. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index15.js +84 -87
  13. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index16.js +116 -88
  14. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index17.js +99 -5
  15. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index18.js +100 -28
  16. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index19.js +5 -5
  17. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index20.js +26 -383
  18. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index21.js +19 -0
  19. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index22.js +407 -0
  20. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index6.js +2 -10
  21. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index7.js +22 -6
  22. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index8.js +11 -182
  23. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index9.js +8 -29
  24. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +12 -12
  25. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index10.js +27 -26
  26. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index11.js +34 -91
  27. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index12.js +96 -12
  28. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index13.js +14 -2
  29. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index14.js +0 -2
  30. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index15.js +4 -175
  31. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index16.js +180 -28
  32. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index17.js +31 -21
  33. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index18.js +21 -65
  34. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js +60 -215
  35. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js +230 -29
  36. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js +32 -26
  37. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.js +26 -71
  38. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index23.js +71 -82
  39. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index24.js +87 -0
  40. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index3.js +38 -28
  41. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index4.js +2 -46
  42. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index5.js +48 -139
  43. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index6.js +138 -48
  44. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index7.js +47 -26
  45. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index8.js +32 -33
  46. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index9.js +31 -38
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +20 -8
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +1 -0
  49. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  50. package/package.json +1 -1
@@ -1,33 +1,185 @@
1
- import { Typography as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
1
+ import { Combobox as e, Input as t, Label as n, Select as r, SelectContent as i, SelectItem as a, SelectTrigger as o, SelectValue as s } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
3
3
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index16.js
4
- function r({ label: r, value: i, testId: a }) {
5
- return i ? /* @__PURE__ */ n("div", {
6
- className: "ttw:grid ttw:min-w-0 ttw:grid-cols-2 ttw:gap-4",
7
- "data-testid": a,
8
- children: [/* @__PURE__ */ t(e, {
9
- component: "span",
10
- variant: "body2",
11
- className: "ttw:min-w-0 ttw:text-muted-foreground",
12
- children: r
13
- }), /* @__PURE__ */ t(e, {
14
- component: "span",
15
- variant: "body2",
16
- className: "ttw:min-w-0 ttw:wrap-break-word ttw:whitespace-pre-line ttw:text-left ttw:font-medium ttw:text-foreground",
17
- children: i
18
- })]
19
- }) : null;
4
+ function u({ htmlFor: e, children: t }) {
5
+ return /* @__PURE__ */ c(n, {
6
+ htmlFor: e,
7
+ className: "ttw:mb-1 ttw:block ttw:text-sm ttw:font-medium",
8
+ children: t
9
+ });
20
10
  }
21
- function i({ rows: e, testIds: n }) {
22
- return /* @__PURE__ */ t("div", {
23
- className: "ttw:flex ttw:flex-col ttw:gap-2",
24
- "data-testid": n?.root,
25
- children: e.map((e) => /* @__PURE__ */ t(r, {
26
- label: e.label,
27
- value: e.value,
28
- testId: e.testId
29
- }, e.testId ?? e.label))
11
+ var d = "ttw:w-full";
12
+ function f({ fields: n, testIds: f, labels: p, isDisabled: m, websiteInvalid: h = !1, taxIdRequired: g, taxIdPlaceholder: _, taxIdHelpText: v }) {
13
+ return /* @__PURE__ */ l("section", {
14
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
15
+ "data-testid": f?.root,
16
+ children: [
17
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c(u, {
18
+ htmlFor: "companyLegalName",
19
+ children: p.companyLegalName
20
+ }), /* @__PURE__ */ c(t, {
21
+ id: "companyLegalName",
22
+ value: n.companyLegalName.value,
23
+ onChange: (e) => n.companyLegalName.onValueChange(e.target.value),
24
+ disabled: m,
25
+ required: !0
26
+ })] }),
27
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c(u, {
28
+ htmlFor: "companyDbaName",
29
+ children: p.companyDbaName
30
+ }), /* @__PURE__ */ c(t, {
31
+ id: "companyDbaName",
32
+ value: n.companyDbaName.value,
33
+ onChange: (e) => n.companyDbaName.onValueChange(e.target.value),
34
+ disabled: m
35
+ })] }),
36
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c(u, {
37
+ htmlFor: "businessAddress",
38
+ children: p.businessAddress
39
+ }), /* @__PURE__ */ c(t, {
40
+ id: "businessAddress",
41
+ value: n.businessAddress.value,
42
+ onChange: (e) => n.businessAddress.onValueChange(e.target.value),
43
+ disabled: m,
44
+ required: !0
45
+ })] }),
46
+ /* @__PURE__ */ l("div", {
47
+ className: "ttw:grid ttw:grid-cols-3 ttw:gap-4",
48
+ children: [
49
+ /* @__PURE__ */ l("div", {
50
+ className: "ttw:min-w-0",
51
+ children: [/* @__PURE__ */ c(u, {
52
+ htmlFor: "city",
53
+ children: p.city
54
+ }), /* @__PURE__ */ c(t, {
55
+ id: "city",
56
+ value: n.city.value,
57
+ onChange: (e) => n.city.onValueChange(e.target.value),
58
+ disabled: m,
59
+ required: !0
60
+ })]
61
+ }),
62
+ /* @__PURE__ */ l("div", {
63
+ className: "ttw:min-w-0",
64
+ children: [/* @__PURE__ */ c(u, {
65
+ htmlFor: "state",
66
+ children: p.state
67
+ }), /* @__PURE__ */ l(r, {
68
+ value: n.state.value,
69
+ onValueChange: n.state.onValueChange,
70
+ disabled: m,
71
+ children: [/* @__PURE__ */ c(o, {
72
+ id: "state",
73
+ className: d,
74
+ children: /* @__PURE__ */ c(s, { placeholder: p.statePlaceholder })
75
+ }), /* @__PURE__ */ c(i, { children: n.state.options.map((e) => /* @__PURE__ */ c(a, {
76
+ value: e.value,
77
+ children: e.label
78
+ }, e.value)) })]
79
+ })]
80
+ }),
81
+ /* @__PURE__ */ l("div", {
82
+ className: "ttw:min-w-0",
83
+ children: [/* @__PURE__ */ c(u, {
84
+ htmlFor: "zipCode",
85
+ children: p.zipCode
86
+ }), /* @__PURE__ */ c(t, {
87
+ id: "zipCode",
88
+ value: n.zipCode.value,
89
+ onChange: (e) => n.zipCode.onValueChange(e.target.value),
90
+ disabled: m,
91
+ required: !0,
92
+ inputMode: "numeric"
93
+ })]
94
+ })
95
+ ]
96
+ }),
97
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c(u, {
98
+ htmlFor: "companyPhoneNumber",
99
+ children: p.companyPhoneNumber
100
+ }), /* @__PURE__ */ c(t, {
101
+ id: "companyPhoneNumber",
102
+ type: "tel",
103
+ value: n.companyPhoneNumber.value,
104
+ onChange: (e) => n.companyPhoneNumber.onValueChange(e.target.value),
105
+ disabled: m,
106
+ required: !0
107
+ })] }),
108
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c(u, {
109
+ htmlFor: "companyStructure",
110
+ children: p.companyStructure
111
+ }), /* @__PURE__ */ l(r, {
112
+ value: n.companyStructure.value,
113
+ onValueChange: n.companyStructure.onValueChange,
114
+ disabled: m,
115
+ children: [/* @__PURE__ */ c(o, {
116
+ id: "companyStructure",
117
+ className: d,
118
+ children: /* @__PURE__ */ c(s, { placeholder: p.companyStructurePlaceholder })
119
+ }), /* @__PURE__ */ c(i, { children: n.companyStructure.options.map((e) => /* @__PURE__ */ c(a, {
120
+ value: e.value,
121
+ children: e.label
122
+ }, e.value)) })]
123
+ })] }),
124
+ /* @__PURE__ */ l("div", { children: [
125
+ /* @__PURE__ */ c(u, {
126
+ htmlFor: "website",
127
+ children: p.website
128
+ }),
129
+ /* @__PURE__ */ c(t, {
130
+ id: "website",
131
+ type: "url",
132
+ value: n.website.value,
133
+ onChange: (e) => n.website.onValueChange(e.target.value),
134
+ disabled: m,
135
+ "aria-invalid": h || void 0,
136
+ "aria-describedby": h ? "website-error" : void 0
137
+ }),
138
+ h ? /* @__PURE__ */ c("p", {
139
+ id: "website-error",
140
+ className: "ttw:mt-1 ttw:text-sm ttw:text-destructive",
141
+ role: "alert",
142
+ children: p.websiteInvalid
143
+ }) : null
144
+ ] }),
145
+ /* @__PURE__ */ l("div", { children: [
146
+ /* @__PURE__ */ c(u, {
147
+ htmlFor: "taxId",
148
+ children: p.taxId
149
+ }),
150
+ /* @__PURE__ */ c(t, {
151
+ id: "taxId",
152
+ value: n.taxId.value,
153
+ onChange: (e) => n.taxId.onValueChange(e.target.value),
154
+ disabled: m,
155
+ required: g,
156
+ inputMode: "numeric",
157
+ maxLength: 9,
158
+ placeholder: _,
159
+ "aria-describedby": v ? "taxId-on-file" : void 0
160
+ }),
161
+ v ? /* @__PURE__ */ c("p", {
162
+ id: "taxId-on-file",
163
+ className: "ttw:mt-1 ttw:text-xs ttw:text-muted-foreground",
164
+ children: v
165
+ }) : null
166
+ ] }),
167
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c(u, {
168
+ htmlFor: "naicsCode",
169
+ children: p.naicsCode
170
+ }), /* @__PURE__ */ c(e, {
171
+ id: "naicsCode",
172
+ "data-testid": f?.naicsCombobox,
173
+ items: n.naicsCode.options,
174
+ value: n.naicsCode.value,
175
+ onValueChange: (e) => {
176
+ n.naicsCode.onValueChange(Array.isArray(e) ? e[0] ?? "" : e);
177
+ },
178
+ labels: { placeholder: p.naicsCodePlaceholder },
179
+ disabled: m
180
+ })] })
181
+ ]
30
182
  });
31
183
  }
32
184
  //#endregion
33
- export { i as BusinessDetailsSummary };
185
+ export { f as BusinessDetailsEditForm };
@@ -1,23 +1,33 @@
1
+ import { Typography as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
1
3
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index17.js
2
- var e = {
3
- panelTitle: "Business Details",
4
- editButtonAriaLabel: "Edit business details",
5
- editTooltip: "Edit business details",
6
- companyLegalName: "Legal company name",
7
- companyDbaName: "Doing business as (optional)",
8
- businessAddress: "Business address",
9
- city: "City",
10
- state: "State",
11
- statePlaceholder: "Select state",
12
- zipCode: "Postal code",
13
- companyPhoneNumber: "Company phone number",
14
- companyStructure: "Company structure",
15
- companyStructurePlaceholder: "Select structure",
16
- website: "Website (optional)",
17
- websiteInvalid: "Enter a valid website URL (no spaces).",
18
- taxId: "Tax ID (EIN)",
19
- naicsCode: "Industry (NAICS code)",
20
- naicsCodePlaceholder: "Search by code or industry"
21
- };
4
+ function r({ label: r, value: i, testId: a }) {
5
+ return i ? /* @__PURE__ */ n("div", {
6
+ className: "ttw:grid ttw:min-w-0 ttw:grid-cols-2 ttw:gap-4",
7
+ "data-testid": a,
8
+ children: [/* @__PURE__ */ t(e, {
9
+ component: "span",
10
+ variant: "body2",
11
+ className: "ttw:min-w-0 ttw:text-muted-foreground",
12
+ children: r
13
+ }), /* @__PURE__ */ t(e, {
14
+ component: "span",
15
+ variant: "body2",
16
+ className: "ttw:min-w-0 ttw:wrap-break-word ttw:whitespace-pre-line ttw:text-left ttw:font-medium ttw:text-foreground",
17
+ children: i
18
+ })]
19
+ }) : null;
20
+ }
21
+ function i({ rows: e, testIds: n }) {
22
+ return /* @__PURE__ */ t("div", {
23
+ className: "ttw:flex ttw:flex-col ttw:gap-2",
24
+ "data-testid": n?.root,
25
+ children: e.map((e) => /* @__PURE__ */ t(r, {
26
+ label: e.label,
27
+ value: e.value,
28
+ testId: e.testId
29
+ }, e.testId ?? e.label))
30
+ });
31
+ }
22
32
  //#endregion
23
- export { e as BUSINESS_DETAILS_PANEL_LABELS_EN };
33
+ export { i as BusinessDetailsSummary };
@@ -1,67 +1,23 @@
1
- import { Button as e, Tooltip as t, TooltipContent as n, TooltipProvider as r, TooltipTrigger as i, Typography as a } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { BUSINESS_DETAILS_PANEL_LABELS_EN as o } from "./index17.js";
3
- import { BusinessDetailsEditForm as s } from "./index15.js";
4
- import { BusinessDetailsSummary as c } from "./index16.js";
5
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
6
- import { Pen as d } from "lucide-react";
7
1
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index18.js
8
- function f({ isEditing: f, onEditClick: p, summaryRows: m, editFields: h, labels: g, isDisabled: _, websiteInvalid: v, testIds: y }) {
9
- let b = {
10
- ...o,
11
- ...g
12
- };
13
- return f ? /* @__PURE__ */ l(s, {
14
- fields: h,
15
- labels: b,
16
- isDisabled: _,
17
- websiteInvalid: v,
18
- testIds: y?.editForm
19
- }) : /* @__PURE__ */ u("section", {
20
- "data-testid": y?.root,
21
- className: "ttw:relative ttw:min-w-0 ttw:rounded-lg ttw:bg-surface-subtle ttw:p-4",
22
- children: [
23
- /* @__PURE__ */ u("div", {
24
- className: "ttw:mb-3 ttw:flex ttw:items-center ttw:justify-between ttw:gap-3",
25
- children: [/* @__PURE__ */ l(a, {
26
- component: "h3",
27
- variant: "h6",
28
- className: "ttw:font-semibold ttw:text-foreground",
29
- children: b.panelTitle
30
- }), /* @__PURE__ */ l(r, { children: /* @__PURE__ */ u(t, { children: [/* @__PURE__ */ l(i, {
31
- asChild: !0,
32
- onFocus: (e) => {
33
- e.preventDefault();
34
- },
35
- children: /* @__PURE__ */ l(e, {
36
- type: "button",
37
- variant: "ghost",
38
- size: "icon-sm",
39
- onClick: p,
40
- disabled: _,
41
- "aria-label": b.editButtonAriaLabel,
42
- "data-testid": y?.editButton,
43
- className: "ttw:rounded-lg ttw:bg-muted ttw:text-foreground ttw:hover:bg-primary/10 ttw:hover:text-foreground",
44
- children: /* @__PURE__ */ l(d, {
45
- className: "ttw:size-5",
46
- "aria-hidden": !0
47
- })
48
- })
49
- }), /* @__PURE__ */ l(n, {
50
- side: "top",
51
- sideOffset: 4,
52
- children: b.editTooltip
53
- })] }) })]
54
- }),
55
- /* @__PURE__ */ l("div", {
56
- className: "ttw:mb-3 ttw:border-b ttw:border-border",
57
- "aria-hidden": !0
58
- }),
59
- /* @__PURE__ */ l(c, {
60
- rows: m,
61
- testIds: y?.summary
62
- })
63
- ]
64
- });
65
- }
2
+ var e = {
3
+ panelTitle: "Business Details",
4
+ editButtonAriaLabel: "Edit business details",
5
+ editTooltip: "Edit business details",
6
+ companyLegalName: "Legal company name",
7
+ companyDbaName: "Doing business as (optional)",
8
+ businessAddress: "Business address",
9
+ city: "City",
10
+ state: "State",
11
+ statePlaceholder: "Select state",
12
+ zipCode: "Postal code",
13
+ companyPhoneNumber: "Company phone number",
14
+ companyStructure: "Company structure",
15
+ companyStructurePlaceholder: "Select structure",
16
+ website: "Website (optional)",
17
+ websiteInvalid: "Enter a valid website URL (no spaces).",
18
+ taxId: "Tax ID (EIN)",
19
+ naicsCode: "Industry (NAICS code)",
20
+ naicsCodePlaceholder: "Search by code or industry"
21
+ };
66
22
  //#endregion
67
- export { o as BUSINESS_DETAILS_PANEL_LABELS_EN, f as BusinessDetailsPanel };
23
+ export { e as BUSINESS_DETAILS_PANEL_LABELS_EN };
@@ -1,225 +1,70 @@
1
- import { Button as e, DatePicker as t, Input as n, InputGroup as r, InputGroupAddon as i, InputGroupInput as a, Label as o, RadioGroup as s, RadioGroupItem as c, Select as l, SelectContent as u, SelectItem as d, SelectTrigger as f, SelectValue as p } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { useState as m } from "react";
3
- import { jsx as h, jsxs as g } from "react/jsx-runtime";
4
- import { EyeIcon as _, EyeOffIcon as v } from "lucide-react";
1
+ import { Button as e, Tooltip as t, TooltipContent as n, TooltipProvider as r, TooltipTrigger as i, Typography as a } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { BUSINESS_DETAILS_PANEL_LABELS_EN as o } from "./index18.js";
3
+ import { BusinessDetailsEditForm as s } from "./index16.js";
4
+ import { BusinessDetailsSummary as c } from "./index17.js";
5
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
6
+ import { Pen as d } from "lucide-react";
5
7
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js
6
- function y({ htmlFor: e, children: t }) {
7
- return /* @__PURE__ */ h(o, {
8
- htmlFor: e,
9
- className: "ttw:mb-1 ttw:block ttw:text-sm ttw:font-medium",
10
- children: t
11
- });
12
- }
13
- var b = "ttw:w-full";
14
- function x({ fields: x, testIds: S, labels: C, isDisabled: w, ssnRevealed: T, ssnToggleAriaLabel: E, onToggleSsnVisibility: D, showOwnershipPercentage: O, maxBirthDate: k, ssnMaskedDisplay: A, ssnFormattedDisplay: j }) {
15
- let [M, N] = m(!1), P = !T && !M;
16
- return /* @__PURE__ */ g("section", {
17
- className: "ttw:flex ttw:flex-col ttw:gap-3",
8
+ function f({ isEditing: f, onEditClick: p, summaryRows: m, editFields: h, labels: g, isDisabled: _, websiteInvalid: v, taxIdRequired: y, taxIdPlaceholder: b, taxIdHelpText: x, testIds: S }) {
9
+ let C = {
10
+ ...o,
11
+ ...g
12
+ };
13
+ return f ? /* @__PURE__ */ l(s, {
14
+ fields: h,
15
+ labels: C,
16
+ isDisabled: _,
17
+ websiteInvalid: v,
18
+ taxIdRequired: y,
19
+ taxIdPlaceholder: b,
20
+ taxIdHelpText: x,
21
+ testIds: S?.editForm
22
+ }) : /* @__PURE__ */ u("section", {
18
23
  "data-testid": S?.root,
24
+ className: "ttw:relative ttw:min-w-0 ttw:rounded-lg ttw:bg-surface-subtle ttw:p-4",
19
25
  children: [
20
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(y, {
21
- htmlFor: "firstName",
22
- children: C.firstName
23
- }), /* @__PURE__ */ h(n, {
24
- id: "firstName",
25
- value: x.firstName.value,
26
- onChange: (e) => x.firstName.onValueChange(e.target.value),
27
- disabled: w,
28
- required: !0
29
- })] }),
30
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(y, {
31
- htmlFor: "lastName",
32
- children: C.lastName
33
- }), /* @__PURE__ */ h(n, {
34
- id: "lastName",
35
- value: x.lastName.value,
36
- onChange: (e) => x.lastName.onValueChange(e.target.value),
37
- disabled: w,
38
- required: !0
39
- })] }),
40
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(y, {
41
- htmlFor: "dateOfBirth",
42
- children: C.dateOfBirth
43
- }), /* @__PURE__ */ h(t, {
44
- id: "dateOfBirth",
45
- value: x.dateOfBirth.value,
46
- onChange: x.dateOfBirth.onValueChange,
47
- placeholder: C.dateOfBirthPlaceholder,
48
- disabled: w,
49
- maxDate: k
50
- })] }),
51
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(y, {
52
- htmlFor: "ssn",
53
- children: C.ssn
54
- }), /* @__PURE__ */ g("div", {
55
- className: "ttw:flex ttw:gap-2",
56
- children: [/* @__PURE__ */ h(n, {
57
- id: "ssn",
58
- className: "ttw:flex-1 ttw:font-mono ttw:tracking-wider",
59
- type: "text",
60
- value: P ? A : j,
61
- onChange: (e) => x.ssn.onValueChange(e.target.value),
62
- onFocus: () => N(!0),
63
- onBlur: () => N(!1),
64
- disabled: w,
65
- autoComplete: "off",
66
- inputMode: "numeric",
67
- maxLength: 11,
68
- required: !0
69
- }), /* @__PURE__ */ h(e, {
70
- type: "button",
71
- variant: "outline",
72
- size: "icon",
73
- onClick: D,
74
- disabled: w,
75
- "aria-label": E,
76
- children: h(T ? v : _, { className: "ttw:size-4" })
77
- })]
78
- })] }),
79
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(y, {
80
- htmlFor: "homeAddress",
81
- children: C.homeAddress
82
- }), /* @__PURE__ */ h(n, {
83
- id: "homeAddress",
84
- value: x.homeAddress.value,
85
- onChange: (e) => x.homeAddress.onValueChange(e.target.value),
86
- disabled: w,
87
- required: !0
88
- })] }),
89
- /* @__PURE__ */ g("div", {
90
- className: "ttw:grid ttw:grid-cols-3 ttw:gap-4",
91
- children: [
92
- /* @__PURE__ */ g("div", {
93
- className: "ttw:min-w-0",
94
- children: [/* @__PURE__ */ h(y, {
95
- htmlFor: "city",
96
- children: C.city
97
- }), /* @__PURE__ */ h(n, {
98
- id: "city",
99
- value: x.city.value,
100
- onChange: (e) => x.city.onValueChange(e.target.value),
101
- disabled: w,
102
- required: !0
103
- })]
104
- }),
105
- /* @__PURE__ */ g("div", {
106
- className: "ttw:min-w-0",
107
- children: [/* @__PURE__ */ h(y, {
108
- htmlFor: "state",
109
- children: C.state
110
- }), /* @__PURE__ */ g(l, {
111
- value: x.state.value,
112
- onValueChange: x.state.onValueChange,
113
- disabled: w,
114
- children: [/* @__PURE__ */ h(f, {
115
- id: "state",
116
- className: b,
117
- children: /* @__PURE__ */ h(p, { placeholder: C.statePlaceholder })
118
- }), /* @__PURE__ */ h(u, { children: x.state.options.map((e) => /* @__PURE__ */ h(d, {
119
- value: e.value,
120
- children: e.label
121
- }, e.value)) })]
122
- })]
123
- }),
124
- /* @__PURE__ */ g("div", {
125
- className: "ttw:min-w-0",
126
- children: [/* @__PURE__ */ h(y, {
127
- htmlFor: "zipCode",
128
- children: C.zipCode
129
- }), /* @__PURE__ */ h(n, {
130
- id: "zipCode",
131
- value: x.zipCode.value,
132
- onChange: (e) => x.zipCode.onValueChange(e.target.value),
133
- disabled: w,
134
- required: !0,
135
- inputMode: "numeric"
136
- })]
26
+ /* @__PURE__ */ u("div", {
27
+ className: "ttw:mb-3 ttw:flex ttw:items-center ttw:justify-between ttw:gap-3",
28
+ children: [/* @__PURE__ */ l(a, {
29
+ component: "h3",
30
+ variant: "h6",
31
+ className: "ttw:font-semibold ttw:text-foreground",
32
+ children: C.panelTitle
33
+ }), /* @__PURE__ */ l(r, { children: /* @__PURE__ */ u(t, { children: [/* @__PURE__ */ l(i, {
34
+ asChild: !0,
35
+ onFocus: (e) => {
36
+ e.preventDefault();
37
+ },
38
+ children: /* @__PURE__ */ l(e, {
39
+ type: "button",
40
+ variant: "ghost",
41
+ size: "icon-sm",
42
+ onClick: p,
43
+ disabled: _,
44
+ "aria-label": C.editButtonAriaLabel,
45
+ "data-testid": S?.editButton,
46
+ className: "ttw:rounded-lg ttw:bg-muted ttw:text-foreground ttw:hover:bg-primary/10 ttw:hover:text-foreground",
47
+ children: /* @__PURE__ */ l(d, {
48
+ className: "ttw:size-5",
49
+ "aria-hidden": !0
50
+ })
137
51
  })
138
- ]
52
+ }), /* @__PURE__ */ l(n, {
53
+ side: "top",
54
+ sideOffset: 4,
55
+ children: C.editTooltip
56
+ })] }) })]
139
57
  }),
140
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(y, {
141
- htmlFor: "mobilePhoneNumber",
142
- children: C.mobilePhoneNumber
143
- }), /* @__PURE__ */ h(n, {
144
- id: "mobilePhoneNumber",
145
- type: "tel",
146
- value: x.mobilePhoneNumber.value,
147
- onChange: (e) => x.mobilePhoneNumber.onValueChange(e.target.value),
148
- disabled: w,
149
- required: !0
150
- })] }),
151
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(y, {
152
- htmlFor: "workEmail",
153
- children: C.workEmail
154
- }), /* @__PURE__ */ h(n, {
155
- id: "workEmail",
156
- type: "email",
157
- value: x.workEmail.value,
158
- onChange: (e) => x.workEmail.onValueChange(e.target.value),
159
- disabled: w,
160
- required: !0
161
- })] }),
162
- /* @__PURE__ */ g("fieldset", {
163
- "data-testid": S?.ownsOver25Question,
164
- children: [/* @__PURE__ */ h("legend", {
165
- id: "ownsOver25Legend",
166
- className: "ttw:mb-2 ttw:text-sm ttw:font-medium",
167
- children: C.ownsOver25Question
168
- }), /* @__PURE__ */ g(s, {
169
- value: x.ownsOver25Percent.value,
170
- onValueChange: x.ownsOver25Percent.onValueChange,
171
- className: "ttw:flex ttw:gap-4",
172
- disabled: w,
173
- "aria-labelledby": "ownsOver25Legend",
174
- children: [/* @__PURE__ */ g("div", {
175
- className: "ttw:flex ttw:cursor-pointer ttw:items-center ttw:gap-2",
176
- children: [/* @__PURE__ */ h(c, {
177
- value: "yes",
178
- id: "ownsOver25Yes",
179
- className: "ttw:cursor-pointer"
180
- }), /* @__PURE__ */ h(o, {
181
- htmlFor: "ownsOver25Yes",
182
- className: "ttw:cursor-pointer",
183
- children: C.ownsOver25Yes
184
- })]
185
- }), /* @__PURE__ */ g("div", {
186
- className: "ttw:flex ttw:cursor-pointer ttw:items-center ttw:gap-2",
187
- children: [/* @__PURE__ */ h(c, {
188
- value: "no",
189
- id: "ownsOver25No",
190
- className: "ttw:cursor-pointer"
191
- }), /* @__PURE__ */ h(o, {
192
- htmlFor: "ownsOver25No",
193
- className: "ttw:cursor-pointer",
194
- children: C.ownsOver25No
195
- })]
196
- })]
197
- })]
58
+ /* @__PURE__ */ l("div", {
59
+ className: "ttw:mb-3 ttw:border-b ttw:border-border",
60
+ "aria-hidden": !0
198
61
  }),
199
- O ? /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(y, {
200
- htmlFor: "ownershipPercentage",
201
- children: C.ownershipPercentage
202
- }), /* @__PURE__ */ g(r, {
203
- className: "ttw:w-32",
204
- children: [/* @__PURE__ */ h(a, {
205
- id: "ownershipPercentage",
206
- type: "number",
207
- min: 25,
208
- max: 100,
209
- "data-has-end-addon": "",
210
- placeholder: C.ownershipPercentagePlaceholder,
211
- value: x.ownershipPercentage.value ?? "",
212
- onChange: (e) => x.ownershipPercentage.onValueChange(e.target.value === "" ? null : Number(e.target.value)),
213
- disabled: w,
214
- required: !0
215
- }), /* @__PURE__ */ h(i, {
216
- align: "inline-end",
217
- "aria-hidden": !0,
218
- children: "%"
219
- })]
220
- })] }) : null
62
+ /* @__PURE__ */ l(c, {
63
+ rows: m,
64
+ testIds: S?.summary
65
+ })
221
66
  ]
222
67
  });
223
68
  }
224
69
  //#endregion
225
- export { x as AboutYouEditForm };
70
+ export { o as BUSINESS_DETAILS_PANEL_LABELS_EN, f as BusinessDetailsPanel };