@tesouro/embedded-components-react 0.5.271 → 0.5.272

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 (51) hide show
  1. package/dist/index.css +17 -0
  2. package/dist/index.d.ts +19 -0
  3. package/dist/index.js +4 -4
  4. package/dist/lib/BankAccountOnboardingWidget.d.ts +19 -0
  5. package/dist/lib/BankAccountOnboardingWidget.js +4 -4
  6. package/dist/lib/WidgetSuite.d.ts +19 -0
  7. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/AdditionalOwnersStep.js +94 -73
  8. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BankAccountOnboardingWidget.js +7 -7
  9. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BusinessDetailsStep.js +71 -57
  10. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/PersonalDetailsStep.js +61 -46
  11. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/additionalOwnerDraft.js +22 -24
  12. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/applicationStatusView.js +2 -2
  13. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/businessDetailsPanelMapping.js +28 -32
  14. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/draftApplicationMapping.js +3 -3
  15. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/fieldErrors.js +40 -0
  16. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/labels.js +1 -1
  17. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/personalDetailsPanelMapping.js +2 -2
  18. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/stepSchemas.js +26 -21
  19. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +18 -18
  20. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index10.js +6 -58
  21. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index11.js +57 -31
  22. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index12.js +31 -38
  23. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index13.js +27 -26
  24. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index14.js +34 -91
  25. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index15.js +96 -12
  26. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index16.js +14 -2
  27. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index17.js +0 -2
  28. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index18.js +4 -185
  29. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js +269 -25
  30. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js +28 -21
  31. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js +21 -68
  32. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.js +59 -225
  33. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index23.js +338 -26
  34. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index24.js +29 -26
  35. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +26 -74
  36. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index26.js +71 -82
  37. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index27.js +85 -8
  38. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index28.js +8 -57
  39. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index29.js +57 -9
  40. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index3.js +34 -261
  41. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index30.js +9 -62
  42. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index31.js +64 -0
  43. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index4.js +331 -2
  44. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index5.js +2 -48
  45. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index6.js +53 -139
  46. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index7.js +146 -50
  47. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index8.js +50 -28
  48. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index9.js +35 -6
  49. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  50. package/dist/packages/shared-ui-shadcn/dist/index.js +14 -9
  51. package/package.json +1 -1
@@ -1,265 +1,38 @@
1
- import { Button as e, DatePicker as t, Input as n, InputGroup as r, InputGroupAddon as i, InputGroupInput as a, Label as o, Select as s, SelectContent as c, SelectItem as l, SelectTrigger as u, SelectValue as d, Separator as f } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { OnboardingShellOverlayPortal as p } from "../../../shared/ui/dist/lib/OnboardingShell/OnboardingShellOverlayPortal.js";
3
- import "../../../shared/ui/dist/index.js";
4
- import * as m from "react";
5
- import { jsx as h, jsxs as g } from "react/jsx-runtime";
6
- import { EyeIcon as _, EyeOffIcon as v, PlusIcon as y, UserPlusIcon as b, XIcon as x } from "lucide-react";
1
+ import { jsx as e } from "react/jsx-runtime";
7
2
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index3.js
8
- function S({ htmlFor: e, children: t }) {
9
- return /* @__PURE__ */ h(o, {
10
- htmlFor: e,
11
- className: "ttw:mb-1 ttw:block ttw:text-sm ttw:font-medium",
12
- children: t
13
- });
3
+ function t(e) {
4
+ return `${e}-error`;
14
5
  }
15
- var C = "ttw:w-full";
16
- function w({ fields: o, display: w, isExisting: T, isValid: E, isDisabled: D, labels: O, onCancel: k, onSubmit: A, onClose: j, ssnRevealed: M, ssnToggleAriaLabel: N, onToggleSsnVisibility: P, testIds: F }) {
17
- let [I, L] = m.useState(!1), R = !M && !I, z = T ? O.saveOwnerSubmit : O.addOwnerSubmit;
18
- return /* @__PURE__ */ h(p, {
19
- expandContainer: !0,
20
- testIds: F?.overlay,
21
- children: /* @__PURE__ */ g("div", {
22
- className: "ttw:flex ttw:h-full ttw:w-full ttw:min-h-0 ttw:flex-col ttw:px-8 ttw:pb-8 ttw:pt-8",
23
- role: "dialog",
24
- "aria-modal": "true",
25
- "aria-labelledby": "additional-owner-form-title",
26
- children: [
27
- /* @__PURE__ */ g("div", {
28
- className: "ttw:relative ttw:shrink-0",
29
- children: [
30
- /* @__PURE__ */ h(e, {
31
- type: "button",
32
- variant: "ghost",
33
- size: "icon-sm",
34
- onClick: j,
35
- disabled: D,
36
- "aria-label": O.close,
37
- className: "ttw:absolute ttw:top-0 ttw:right-0",
38
- children: /* @__PURE__ */ h(x, { className: "ttw:size-4" })
39
- }),
40
- /* @__PURE__ */ h("div", {
41
- className: "ttw:mb-3 ttw:flex ttw:size-10 ttw:items-center ttw:justify-center ttw:rounded-full ttw:bg-primary/10",
42
- "aria-hidden": !0,
43
- children: /* @__PURE__ */ h(b, { className: "ttw:size-5 ttw:text-primary" })
44
- }),
45
- /* @__PURE__ */ h("h2", {
46
- id: "additional-owner-form-title",
47
- className: "ttw:pr-10 ttw:text-xl ttw:font-semibold ttw:tracking-tight",
48
- children: T ? O.formHeadingEdit : O.formHeadingAdd
49
- })
50
- ]
51
- }),
52
- /* @__PURE__ */ h(f, { className: "ttw:my-4 ttw:shrink-0" }),
53
- /* @__PURE__ */ g("div", {
54
- className: "ttw:flex ttw:min-h-0 ttw:flex-1 ttw:flex-col ttw:gap-3 ttw:overflow-y-auto ttw:pb-4",
55
- children: [
56
- /* @__PURE__ */ g("div", {
57
- className: "ttw:grid ttw:grid-cols-2 ttw:gap-3",
58
- children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g(S, {
59
- htmlFor: "owner-first-name",
60
- children: [O.firstName, O.requiredFieldMarker]
61
- }), /* @__PURE__ */ h(n, {
62
- id: "owner-first-name",
63
- value: o.firstName.value,
64
- onChange: (e) => o.firstName.onValueChange(e.target.value),
65
- disabled: D,
66
- required: !0
67
- })] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g(S, {
68
- htmlFor: "owner-last-name",
69
- children: [O.lastName, O.requiredFieldMarker]
70
- }), /* @__PURE__ */ h(n, {
71
- id: "owner-last-name",
72
- value: o.lastName.value,
73
- onChange: (e) => o.lastName.onValueChange(e.target.value),
74
- disabled: D,
75
- required: !0
76
- })] })]
77
- }),
78
- /* @__PURE__ */ g("div", { children: [
79
- /* @__PURE__ */ g(S, {
80
- htmlFor: "owner-dob",
81
- children: [O.dateOfBirth, O.requiredFieldMarker]
82
- }),
83
- /* @__PURE__ */ h(t, {
84
- id: "owner-dob",
85
- value: o.dateOfBirth.value,
86
- onChange: o.dateOfBirth.onValueChange,
87
- placeholder: O.dateOfBirthPlaceholder,
88
- disabled: D,
89
- maxDate: w.maxBirthDate,
90
- "aria-invalid": w.dateOfBirthInvalid || void 0
91
- }),
92
- w.dateOfBirthInvalid ? /* @__PURE__ */ h("p", {
93
- className: "ttw:mt-1 ttw:text-sm ttw:text-destructive",
94
- role: "alert",
95
- children: O.dateOfBirthMinAgeError
96
- }) : null
97
- ] }),
98
- /* @__PURE__ */ g("div", { children: [
99
- /* @__PURE__ */ g(S, {
100
- htmlFor: "owner-ssn",
101
- children: [O.ssn, w.ssnRequired ? O.requiredFieldMarker : null]
102
- }),
103
- /* @__PURE__ */ g("div", {
104
- className: "ttw:flex ttw:gap-2",
105
- children: [/* @__PURE__ */ h(n, {
106
- id: "owner-ssn",
107
- className: "ttw:flex-1 ttw:font-mono ttw:tracking-wider",
108
- type: "text",
109
- value: R ? w.ssnMaskedDisplay : w.ssnFormattedDisplay,
110
- onChange: (e) => o.ssn.onValueChange(e.target.value),
111
- onFocus: () => L(!0),
112
- onBlur: () => L(!1),
113
- disabled: D,
114
- autoComplete: "off",
115
- inputMode: "numeric",
116
- maxLength: 11,
117
- required: w.ssnRequired,
118
- placeholder: w.ssnPlaceholder,
119
- "aria-describedby": w.ssnHelpText ? "owner-ssn-on-file" : void 0
120
- }), /* @__PURE__ */ h(e, {
121
- type: "button",
122
- variant: "outline",
123
- size: "icon",
124
- onClick: P,
125
- disabled: D,
126
- "aria-label": N,
127
- children: h(M ? v : _, { className: "ttw:size-4" })
128
- })]
129
- }),
130
- w.ssnHelpText ? /* @__PURE__ */ h("p", {
131
- id: "owner-ssn-on-file",
132
- className: "ttw:mt-1 ttw:text-xs ttw:text-muted-foreground",
133
- children: w.ssnHelpText
134
- }) : null
135
- ] }),
136
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g(S, {
137
- htmlFor: "owner-home-address",
138
- children: [O.homeAddress, O.requiredFieldMarker]
139
- }), /* @__PURE__ */ h(n, {
140
- id: "owner-home-address",
141
- value: o.homeAddress.value,
142
- onChange: (e) => o.homeAddress.onValueChange(e.target.value),
143
- disabled: D,
144
- required: !0
145
- })] }),
146
- /* @__PURE__ */ g("div", {
147
- className: "ttw:grid ttw:grid-cols-3 ttw:gap-3",
148
- children: [
149
- /* @__PURE__ */ g("div", {
150
- className: "ttw:min-w-0",
151
- children: [/* @__PURE__ */ g(S, {
152
- htmlFor: "owner-city",
153
- children: [O.city, O.requiredFieldMarker]
154
- }), /* @__PURE__ */ h(n, {
155
- id: "owner-city",
156
- value: o.city.value,
157
- onChange: (e) => o.city.onValueChange(e.target.value),
158
- disabled: D,
159
- required: !0
160
- })]
161
- }),
162
- /* @__PURE__ */ g("div", {
163
- className: "ttw:min-w-0",
164
- children: [/* @__PURE__ */ g(S, {
165
- htmlFor: "owner-state",
166
- children: [O.state, O.requiredFieldMarker]
167
- }), /* @__PURE__ */ g(s, {
168
- value: o.state.value,
169
- onValueChange: o.state.onValueChange,
170
- disabled: D,
171
- children: [/* @__PURE__ */ h(u, {
172
- id: "owner-state",
173
- className: C,
174
- children: /* @__PURE__ */ h(d, { placeholder: O.statePlaceholder })
175
- }), /* @__PURE__ */ h(c, { children: o.state.options.map((e) => /* @__PURE__ */ h(l, {
176
- value: e.value,
177
- children: e.label
178
- }, e.value)) })]
179
- })]
180
- }),
181
- /* @__PURE__ */ g("div", {
182
- className: "ttw:min-w-0",
183
- children: [/* @__PURE__ */ g(S, {
184
- htmlFor: "owner-zip",
185
- children: [O.zipCode, O.requiredFieldMarker]
186
- }), /* @__PURE__ */ h(n, {
187
- id: "owner-zip",
188
- value: o.zipCode.value,
189
- onChange: (e) => o.zipCode.onValueChange(e.target.value),
190
- disabled: D,
191
- required: !0,
192
- inputMode: "numeric"
193
- })]
194
- })
195
- ]
196
- }),
197
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g(S, {
198
- htmlFor: "owner-phone",
199
- children: [O.mobilePhoneNumber, O.requiredFieldMarker]
200
- }), /* @__PURE__ */ h(n, {
201
- id: "owner-phone",
202
- type: "tel",
203
- value: o.mobilePhoneNumber.value,
204
- onChange: (e) => o.mobilePhoneNumber.onValueChange(e.target.value),
205
- disabled: D,
206
- required: !0
207
- })] }),
208
- /* @__PURE__ */ g("div", { children: [
209
- /* @__PURE__ */ g(S, {
210
- htmlFor: "owner-ownership",
211
- children: [O.ownershipPercentage, O.requiredFieldMarker]
212
- }),
213
- /* @__PURE__ */ g(r, {
214
- className: "ttw:w-32",
215
- children: [/* @__PURE__ */ h(a, {
216
- id: "owner-ownership",
217
- type: "number",
218
- min: 25,
219
- max: 100,
220
- "data-has-end-addon": "",
221
- placeholder: O.ownershipPercentagePlaceholder,
222
- value: o.ownershipPercentage.value ?? "",
223
- onChange: (e) => o.ownershipPercentage.onValueChange(e.target.value === "" ? null : Number(e.target.value)),
224
- disabled: D,
225
- required: !0,
226
- "aria-invalid": w.ownershipPercentageInvalid || void 0,
227
- "aria-describedby": w.ownershipPercentageInvalid ? "owner-ownership-error" : void 0
228
- }), /* @__PURE__ */ h(i, {
229
- align: "inline-end",
230
- "aria-hidden": !0,
231
- children: O.percentSuffix
232
- })]
233
- }),
234
- w.ownershipPercentageInvalid ? /* @__PURE__ */ h("p", {
235
- id: "owner-ownership-error",
236
- className: "ttw:mt-1 ttw:text-sm ttw:text-destructive",
237
- role: "alert",
238
- children: O.ownershipPercentageMinError
239
- }) : null
240
- ] })
241
- ]
242
- }),
243
- /* @__PURE__ */ h(f, { className: "ttw:my-4 ttw:shrink-0" }),
244
- /* @__PURE__ */ g("div", {
245
- className: "ttw:flex ttw:shrink-0 ttw:justify-end ttw:gap-3",
246
- children: [/* @__PURE__ */ h(e, {
247
- type: "button",
248
- variant: "outline",
249
- onClick: k,
250
- disabled: D,
251
- children: O.cancel
252
- }), /* @__PURE__ */ g(e, {
253
- type: "button",
254
- onClick: A,
255
- disabled: D || !E,
256
- className: "ttw:gap-1.5",
257
- children: [z, /* @__PURE__ */ h(y, { className: "ttw:size-4" })]
258
- })]
259
- })
260
- ]
261
- })
262
- });
6
+ function n(e, n, r) {
7
+ let i = [r, n ? t(e) : void 0].filter(Boolean);
8
+ return {
9
+ "aria-invalid": n ? !0 : void 0,
10
+ "aria-describedby": i.length > 0 ? i.join(" ") : void 0
11
+ };
12
+ }
13
+ function r({ fieldId: n, error: r }) {
14
+ return r ? /* @__PURE__ */ e("p", {
15
+ id: t(n),
16
+ className: "ttw:mt-1 ttw:text-sm ttw:text-destructive",
17
+ role: "alert",
18
+ children: r
19
+ }) : null;
20
+ }
21
+ function i(e) {
22
+ return {
23
+ onOpenChange: (t) => {
24
+ t || e?.();
25
+ },
26
+ onTriggerBlur: (t) => {
27
+ t.currentTarget.getAttribute("aria-expanded") !== "true" && e?.();
28
+ }
29
+ };
30
+ }
31
+ function a(e) {
32
+ return (t) => {
33
+ let n = t.relatedTarget;
34
+ n instanceof Node && t.currentTarget.contains(n) || e?.();
35
+ };
263
36
  }
264
37
  //#endregion
265
- export { w as AdditionalOwnerFormOverlay };
38
+ export { r as FieldError, n as fieldErrorAria, t as fieldErrorId, a as onCompositeBlur, i as selectBlurHandlers };
@@ -1,64 +1,11 @@
1
- import { AlertDialog as e, AlertDialogContent as t, AlertDialogDescription as n, AlertDialogFooter as r, AlertDialogHeader as i, AlertDialogTitle as a, Button as o } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { DELETE_APPLICATION_DIALOG_LABELS_EN as s } from "./index29.js";
3
- import { useRef as c } from "react";
4
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
5
- import { Trash2Icon as d } from "lucide-react";
6
1
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index30.js
7
- function f({ open: f, onConfirm: p, onCancel: m, isDeleting: h = !1, labels: g, testIds: _ }) {
8
- let v = {
9
- ...s,
10
- ...g
11
- }, y = c(null);
12
- return /* @__PURE__ */ l(e, {
13
- open: f,
14
- onOpenChange: (e) => {
15
- !e && !h && m();
16
- },
17
- children: /* @__PURE__ */ u(t, {
18
- "data-testid": _?.root,
19
- onOpenAutoFocus: (e) => {
20
- e.preventDefault(), y.current?.focus();
21
- },
22
- children: [/* @__PURE__ */ u(i, {
23
- className: "ttw:items-center ttw:text-center ttw:sm:items-center ttw:sm:text-center",
24
- children: [
25
- /* @__PURE__ */ l("div", {
26
- className: "ttw:flex ttw:size-14 ttw:items-center ttw:justify-center ttw:rounded-full ttw:bg-destructive/10",
27
- "aria-hidden": !0,
28
- children: /* @__PURE__ */ l(d, { className: "ttw:size-6 ttw:text-destructive" })
29
- }),
30
- /* @__PURE__ */ l(a, { children: v.title }),
31
- /* @__PURE__ */ u(n, { children: [
32
- v.descriptionBeforeEmphasis,
33
- /* @__PURE__ */ l("strong", {
34
- className: "ttw:font-semibold ttw:text-foreground",
35
- children: v.descriptionEmphasis
36
- }),
37
- v.descriptionAfterEmphasis
38
- ] })
39
- ]
40
- }), /* @__PURE__ */ u(r, {
41
- className: "ttw:sm:justify-center",
42
- children: [/* @__PURE__ */ l(o, {
43
- ref: y,
44
- type: "button",
45
- variant: "outline",
46
- onClick: m,
47
- disabled: h,
48
- "data-testid": _?.cancel,
49
- children: v.keepEditingButton
50
- }), /* @__PURE__ */ l(o, {
51
- type: "button",
52
- variant: "destructive",
53
- loading: h,
54
- disabled: h,
55
- onClick: p,
56
- "data-testid": _?.confirm,
57
- children: v.deleteButton
58
- })]
59
- })]
60
- })
61
- });
62
- }
2
+ var e = {
3
+ title: "Delete this application?",
4
+ descriptionBeforeEmphasis: "Everything you've entered so far will be permanently removed. If you'd rather come back later, use ",
5
+ descriptionEmphasis: "Save and close",
6
+ descriptionAfterEmphasis: " instead.",
7
+ keepEditingButton: "Keep editing",
8
+ deleteButton: "Delete application"
9
+ };
63
10
  //#endregion
64
- export { s as DELETE_APPLICATION_DIALOG_LABELS_EN, f as DeleteApplicationDialog };
11
+ export { e as DELETE_APPLICATION_DIALOG_LABELS_EN };
@@ -0,0 +1,64 @@
1
+ import { AlertDialog as e, AlertDialogContent as t, AlertDialogDescription as n, AlertDialogFooter as r, AlertDialogHeader as i, AlertDialogTitle as a, Button as o } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { DELETE_APPLICATION_DIALOG_LABELS_EN as s } from "./index30.js";
3
+ import { useRef as c } from "react";
4
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
5
+ import { Trash2Icon as d } from "lucide-react";
6
+ //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index31.js
7
+ function f({ open: f, onConfirm: p, onCancel: m, isDeleting: h = !1, labels: g, testIds: _ }) {
8
+ let v = {
9
+ ...s,
10
+ ...g
11
+ }, y = c(null);
12
+ return /* @__PURE__ */ l(e, {
13
+ open: f,
14
+ onOpenChange: (e) => {
15
+ !e && !h && m();
16
+ },
17
+ children: /* @__PURE__ */ u(t, {
18
+ "data-testid": _?.root,
19
+ onOpenAutoFocus: (e) => {
20
+ e.preventDefault(), y.current?.focus();
21
+ },
22
+ children: [/* @__PURE__ */ u(i, {
23
+ className: "ttw:items-center ttw:text-center ttw:sm:items-center ttw:sm:text-center",
24
+ children: [
25
+ /* @__PURE__ */ l("div", {
26
+ className: "ttw:flex ttw:size-14 ttw:items-center ttw:justify-center ttw:rounded-full ttw:bg-destructive/10",
27
+ "aria-hidden": !0,
28
+ children: /* @__PURE__ */ l(d, { className: "ttw:size-6 ttw:text-destructive" })
29
+ }),
30
+ /* @__PURE__ */ l(a, { children: v.title }),
31
+ /* @__PURE__ */ u(n, { children: [
32
+ v.descriptionBeforeEmphasis,
33
+ /* @__PURE__ */ l("strong", {
34
+ className: "ttw:font-semibold ttw:text-foreground",
35
+ children: v.descriptionEmphasis
36
+ }),
37
+ v.descriptionAfterEmphasis
38
+ ] })
39
+ ]
40
+ }), /* @__PURE__ */ u(r, {
41
+ className: "ttw:sm:justify-center",
42
+ children: [/* @__PURE__ */ l(o, {
43
+ ref: y,
44
+ type: "button",
45
+ variant: "outline",
46
+ onClick: m,
47
+ disabled: h,
48
+ "data-testid": _?.cancel,
49
+ children: v.keepEditingButton
50
+ }), /* @__PURE__ */ l(o, {
51
+ type: "button",
52
+ variant: "destructive",
53
+ loading: h,
54
+ disabled: h,
55
+ onClick: p,
56
+ "data-testid": _?.confirm,
57
+ children: v.deleteButton
58
+ })]
59
+ })]
60
+ })
61
+ });
62
+ }
63
+ //#endregion
64
+ export { s as DELETE_APPLICATION_DIALOG_LABELS_EN, f as DeleteApplicationDialog };