@tesouro/embedded-components-react 0.2.280 → 0.2.282

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 (112) hide show
  1. package/README.md +17 -14
  2. package/dist/experimental/WidgetSuite.d.ts +9 -1
  3. package/dist/experimental/index.d.ts +9 -1
  4. package/dist/index.css +20 -6
  5. package/dist/index.d.ts +46 -23
  6. package/dist/index.js +54 -53
  7. package/dist/lib/AcceptDisclosuresWidget.d.ts +9 -1
  8. package/dist/lib/BalancesWidget.d.ts +8 -0
  9. package/dist/lib/BankAccountOnboardingWidget.d.ts +9 -1
  10. package/dist/lib/BankAccountsWidget.d.ts +9 -1
  11. package/dist/lib/BillPayWidget.d.ts +8 -0
  12. package/dist/lib/BillPayWidget.js +1 -1
  13. package/dist/lib/CardDetailsWidget.d.ts +9 -1
  14. package/dist/lib/CardsWidget.d.ts +9 -1
  15. package/dist/lib/ChartOfAccountsWidget.d.ts +9 -1
  16. package/dist/lib/CounterpartsWidget.d.ts +9 -1
  17. package/dist/lib/CreateCardWidget.d.ts +9 -1
  18. package/dist/lib/ExpenseApprovalPoliciesWidget.d.ts +9 -1
  19. package/dist/lib/ExpenseManagementWidget.d.ts +9 -1
  20. package/dist/lib/ExpenseRequirementsWidget.d.ts +9 -1
  21. package/dist/lib/HelpWidget.d.ts +9 -1
  22. package/dist/lib/InsightsWidget.d.ts +8 -0
  23. package/dist/lib/InvoicingWidget.d.ts +9 -1
  24. package/dist/lib/LinkedAccountsWidget.d.ts +9 -1
  25. package/dist/lib/ProductsWidget.d.ts +9 -1
  26. package/dist/lib/ProfileWidget.d.ts +9 -1
  27. package/dist/lib/ReceiptMatchWidget.d.ts +9 -1
  28. package/dist/lib/ReceivablesWidget.d.ts +9 -1
  29. package/dist/lib/SettingsWidget.d.ts +9 -1
  30. package/dist/lib/TagsWidget.d.ts +9 -1
  31. package/dist/lib/TeamWidget.d.ts +9 -1
  32. package/dist/lib/TransfersWidget.d.ts +8 -0
  33. package/dist/lib/WidgetProvider.d.ts +25 -2
  34. package/dist/lib/WidgetProvider.js +8 -7
  35. package/dist/lib/WidgetProviderPublic.d.ts +8 -0
  36. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js +3 -2
  37. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index17.js +54 -53
  38. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index8.js +3 -2
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +9 -5
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +42 -39
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +69 -54
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +21 -2
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +46 -40
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +81 -1
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +46 -47
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +3 -11
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +2 -8
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +5 -3
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +43 -5
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +1 -102
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +11 -3
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +9 -6
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +4 -5
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +127 -76
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +6 -6
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +7 -111
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +85 -1
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +16 -12
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +2 -24
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +8 -0
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +114 -0
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +1 -0
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +25 -0
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +50 -49
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +1 -1
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +25 -12
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +86 -69
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +2 -1
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +7 -7
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +17 -16
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +1 -0
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +1 -1
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +89 -124
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +2 -1
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +31 -26
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +1 -1
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +80 -77
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +20 -4
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +228 -6
  80. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index6.js +3 -2
  81. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index8.js +3 -2
  82. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js +3 -2
  83. package/dist/libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index7.js +30 -29
  84. package/dist/libs/tesouro-embedded-components-react/expense-approval-policies-widget/feature/dist/lib/ExpenseApprovalPoliciesWidgetFeature.js +2 -1
  85. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index3.js +3 -2
  86. package/dist/libs/tesouro-embedded-components-react/expense-receipt-match-widget/feature/dist/lib/ReceiptMatchWidget.js +7 -6
  87. package/dist/libs/tesouro-embedded-components-react/expense-requirements-widget/feature/dist/lib/ExpenseRequirementsWidget.js +2 -1
  88. package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/feature/dist/index8.js +5 -4
  89. package/dist/libs/tesouro-embedded-components-react/help-widget/feature/dist/index3.js +3 -2
  90. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +3 -2
  91. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index3.js +5 -4
  92. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index9.js +3 -2
  93. package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/index8.js +3 -2
  94. package/dist/libs/tesouro-embedded-components-react/profile-widget/feature/dist/index4.js +3 -2
  95. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +3 -2
  96. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +6 -6
  97. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js +53 -11
  98. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/index.js +5 -5
  99. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js +69 -67
  100. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +158 -132
  101. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/hooks.js +7 -4
  102. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/isDisclosuresAcceptanceRequired.js +20 -0
  103. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/labels.js +6 -1
  104. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  105. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +9 -9
  106. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/ErrorState/ErrorState.js +19 -18
  107. package/dist/libs/tesouro-embedded-components-react/tags-widget/feature/dist/index11.js +3 -2
  108. package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index17.js +3 -2
  109. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index5.js +1 -1
  110. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index6.js +3 -2
  111. package/dist/packages/shared-ui-shadcn/dist/index.js +3445 -3413
  112. package/package.json +1 -1
@@ -30,7 +30,8 @@ function n({ payable: n, lineItems: r }) {
30
30
  values: i,
31
31
  lineItems: a.length ? a : [e()],
32
32
  discount: t(n.discount),
33
- tax: t(n.tax_amount)
33
+ tax: t(n.tax_amount),
34
+ total: t(n.total_amount)
34
35
  };
35
36
  }
36
37
  //#endregion
@@ -28,16 +28,16 @@ import "./index32.js";
28
28
  import "./index33.js";
29
29
  import "./index34.js";
30
30
  import "./index35.js";
31
- import "./index36.js";
32
- import "./index37.js";
33
- import { BillsScreen as r } from "./index38.js";
31
+ import { BILL_DETAILS_SHEET_LABELS_EN as r } from "./index36.js";
32
+ import { BillDetailsSheet as i } from "./index37.js";
33
+ import { BillsScreen as a } from "./index38.js";
34
34
  import "./index39.js";
35
- import { BillUploadStatusTray as i } from "./index41.js";
35
+ import { BillUploadStatusTray as o } from "./index41.js";
36
36
  import "./index43.js";
37
37
  import "./index44.js";
38
- import { ExtractionNotice as a } from "./index45.js";
38
+ import { ExtractionNotice as s } from "./index45.js";
39
39
  import "./index46.js";
40
40
  import "./index47.js";
41
- import { SourceDocumentPanel as o } from "./index48.js";
41
+ import { SourceDocumentPanel as c } from "./index48.js";
42
42
  import "./index49.js";
43
- export { e as AddBillDialog, t as BillCreateScreen, n as BillPayWidgetUi, i as BillUploadStatusTray, r as BillsScreen, a as ExtractionNotice, o as SourceDocumentPanel };
43
+ export { e as AddBillDialog, r as BILL_DETAILS_SHEET_LABELS_EN, t as BillCreateScreen, i as BillDetailsSheet, n as BillPayWidgetUi, o as BillUploadStatusTray, a as BillsScreen, s as ExtractionNotice, c as SourceDocumentPanel };
@@ -3,44 +3,45 @@ import { BILL_FORM_FIELDS_LABELS_EN as n } from "./index12.js";
3
3
  import { useId as r } from "react";
4
4
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
5
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js
6
- function o({ values: o, errors: s, onChange: c, testId: l, labels: u }) {
7
- let d = {
6
+ function o({ values: o, errors: s, onChange: c, disabled: l, testId: u, labels: d }) {
7
+ let f = {
8
8
  ...n,
9
- ...u
10
- }, f = r(), p = (n, r, l) => {
11
- let u = `${f}-${n}`, d = `${u}-error`, p = s?.[n];
9
+ ...d
10
+ }, p = r(), m = (n, r, u) => {
11
+ let d = `${p}-${n}`, f = `${d}-error`, m = s?.[n];
12
12
  return /* @__PURE__ */ a("div", {
13
13
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
14
14
  children: [
15
15
  /* @__PURE__ */ i(t, {
16
- htmlFor: u,
16
+ htmlFor: d,
17
17
  children: r
18
18
  }),
19
19
  /* @__PURE__ */ i(e, {
20
- id: u,
21
- type: l,
20
+ id: d,
21
+ type: u,
22
22
  value: o[n],
23
- "aria-invalid": p ? !0 : void 0,
24
- "aria-describedby": p ? d : void 0,
23
+ disabled: l,
24
+ "aria-invalid": m ? !0 : void 0,
25
+ "aria-describedby": m ? f : void 0,
25
26
  onChange: (e) => c({ [n]: e.target.value })
26
27
  }),
27
- p ? /* @__PURE__ */ i("p", {
28
- id: d,
28
+ m ? /* @__PURE__ */ i("p", {
29
+ id: f,
29
30
  className: "ttw:text-sm ttw:text-destructive",
30
- children: p
31
+ children: m
31
32
  }) : null
32
33
  ]
33
34
  });
34
35
  };
35
36
  return /* @__PURE__ */ a("div", {
36
37
  className: "ttw:flex ttw:flex-col ttw:gap-4",
37
- "data-testid": l,
38
+ "data-testid": u,
38
39
  children: [/* @__PURE__ */ a("div", {
39
40
  className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
40
- children: [p("invoiceDate", d.invoiceDate, "date"), p("dueDate", d.dueDate, "date")]
41
+ children: [m("invoiceDate", f.invoiceDate, "date"), m("dueDate", f.dueDate, "date")]
41
42
  }), /* @__PURE__ */ a("div", {
42
43
  className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
43
- children: [p("invoiceNumber", d.invoiceNumber), p("poNumber", d.poNumber)]
44
+ children: [m("invoiceNumber", f.invoiceNumber), m("poNumber", f.poNumber)]
44
45
  })]
45
46
  });
46
47
  }
@@ -86,6 +86,7 @@ function y({ items: y, glCodeOptions: b, discount: x, onDiscountChange: S, tax:
86
86
  onValueChange: (e) => d.onChange({ glCode: e }),
87
87
  children: [/* @__PURE__ */ m(l, {
88
88
  id: `${p}-gl-code`,
89
+ className: "ttw:w-full",
89
90
  "aria-invalid": S("glCode") ? !0 : void 0,
90
91
  "aria-describedby": S("glCode") ? x("glCode") : void 0,
91
92
  children: /* @__PURE__ */ m(u, { placeholder: M.glCodePlaceholder })
@@ -1,6 +1,6 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js
2
2
  var e = {
3
- fieldLabel: "Vendor",
3
+ fieldLabel: "Select or add vendor",
4
4
  placeholder: "Search",
5
5
  loading: "Searching vendors...",
6
6
  emptyResults: "No vendors found",
@@ -1,131 +1,96 @@
1
- import { Input as e, Skeleton as t, cn as n } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { VENDOR_SEARCH_COMBOBOX_LABELS_EN as r } from "./index21.js";
3
- import { useId as i, useState as a } from "react";
4
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
5
- import { Plus as c, Search as l } from "lucide-react";
1
+ import { Command as e, CommandGroup as t, CommandInput as n, CommandItem as r, CommandList as i, CommandSeparator as a, Label as o, Popover as s, PopoverContent as c, PopoverTrigger as l, Skeleton as u, cn as d } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { VENDOR_SEARCH_COMBOBOX_LABELS_EN as f } from "./index21.js";
3
+ import { useId as p, useState as m } from "react";
4
+ import { jsx as h, jsxs as g } from "react/jsx-runtime";
5
+ import { Plus as _, Search as v } from "lucide-react";
6
6
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js
7
- var u = 5, d = "ttw:min-h-44";
8
- function f({ query: f, onQueryChange: p, results: m, isLoading: h, onAddVendor: g, testId: _, labels: v }) {
9
- let y = {
10
- ...r,
11
- ...v
12
- }, b = i(), x = i(), [S, C] = a(!1), [w, T] = a(-1), E = h ? 0 : m.length + 1, D = S && w >= 0 ? `${x}-option-${w}` : void 0, O = (e) => {
13
- C(!1), T(-1), e();
14
- }, k = () => {
15
- C(!1), T(-1), g();
16
- }, A = () => {
17
- C(!1), T(-1);
18
- };
19
- return /* @__PURE__ */ s("div", {
7
+ var y = 5, b = "ttw:min-h-44";
8
+ function x({ query: x, onQueryChange: S, results: C, isLoading: w, onAddVendor: T, testId: E, labels: D }) {
9
+ let O = {
10
+ ...f,
11
+ ...D
12
+ }, k = p(), [A, j] = m(!1);
13
+ return /* @__PURE__ */ g("div", {
20
14
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
21
- "data-testid": _,
22
- children: [/* @__PURE__ */ o("label", {
23
- htmlFor: b,
24
- className: "ttw:text-sm ttw:font-medium",
25
- children: y.fieldLabel
26
- }), /* @__PURE__ */ s("div", {
27
- className: "ttw:relative",
28
- children: [/* @__PURE__ */ s("div", {
29
- className: "ttw:flex ttw:h-10 ttw:items-center ttw:gap-2 ttw:rounded-md ttw:border ttw:border-border ttw:bg-background ttw:px-3",
30
- children: [/* @__PURE__ */ o(l, {
31
- "aria-hidden": !0,
32
- className: "ttw:size-4 ttw:shrink-0 ttw:opacity-50"
33
- }), /* @__PURE__ */ o(e, {
34
- id: b,
35
- value: f,
36
- onChange: (e) => {
37
- C(!0), T(-1), p(e.target.value);
38
- },
39
- onFocus: () => C(!0),
40
- onBlur: A,
41
- onKeyDown: (e) => {
42
- if (e.key === "Escape") {
43
- A();
44
- return;
45
- }
46
- if (E) {
47
- if (e.key === "ArrowDown") {
48
- e.preventDefault(), C(!0), T((e) => e >= E - 1 ? 0 : e + 1);
49
- return;
50
- }
51
- if (e.key === "ArrowUp") {
52
- e.preventDefault(), C(!0), T((e) => e <= 0 ? E - 1 : e - 1);
53
- return;
54
- }
55
- e.key === "Enter" && S && w >= 0 && (e.preventDefault(), w < m.length ? O(m[w].onSelect) : k());
56
- }
57
- },
58
- placeholder: y.placeholder,
15
+ "data-testid": E,
16
+ children: [/* @__PURE__ */ h(o, {
17
+ htmlFor: k,
18
+ children: O.fieldLabel
19
+ }), /* @__PURE__ */ g(s, {
20
+ open: A,
21
+ onOpenChange: j,
22
+ children: [/* @__PURE__ */ h(l, {
23
+ asChild: !0,
24
+ children: /* @__PURE__ */ g("button", {
25
+ type: "button",
26
+ id: k,
59
27
  role: "combobox",
60
- "aria-autocomplete": "list",
61
- "aria-expanded": S,
62
- "aria-controls": S ? x : void 0,
63
- "aria-activedescendant": D,
64
- className: "ttw:h-auto ttw:border-0 ttw:p-0 ttw:shadow-none ttw:ring-0 ttw:focus-visible:ring-0"
65
- })]
66
- }), S ? /* @__PURE__ */ s("div", {
67
- id: x,
68
- role: "listbox",
69
- className: "ttw:absolute ttw:top-full ttw:left-0 ttw:z-10 ttw:mt-1 ttw:max-h-72 ttw:w-full ttw:overflow-y-auto ttw:rounded-md ttw:border ttw:border-border ttw:bg-popover ttw:p-1 ttw:shadow-md",
70
- children: [
71
- h ? /* @__PURE__ */ s("div", {
72
- className: n("ttw:flex ttw:flex-col ttw:gap-2 ttw:p-2", d),
73
- "aria-busy": "true",
74
- children: [/* @__PURE__ */ o("span", {
75
- className: "ttw:sr-only",
76
- children: y.loading
77
- }), Array.from({ length: u }).map((e, n) => /* @__PURE__ */ s("div", {
78
- className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4 ttw:px-2 ttw:py-1.5",
79
- children: [/* @__PURE__ */ o(t, {
80
- height: 14,
81
- width: "55%"
82
- }), /* @__PURE__ */ o(t, {
83
- height: 14,
84
- width: "30%"
85
- })]
86
- }, n))]
87
- }) : m.length === 0 && f ? /* @__PURE__ */ o("div", {
88
- className: n("ttw:flex ttw:items-center ttw:justify-center ttw:py-6 ttw:text-center ttw:text-sm", d),
89
- children: y.emptyResults
90
- }) : m.length > 0 ? /* @__PURE__ */ o("div", {
91
- role: "group",
92
- children: m.map((e, t) => /* @__PURE__ */ s("button", {
93
- id: `${x}-option-${t}`,
94
- type: "button",
95
- role: "option",
96
- "aria-selected": w === t,
97
- onMouseDown: (e) => e.preventDefault(),
98
- onMouseEnter: () => T(t),
99
- onClick: () => O(e.onSelect),
100
- className: n("ttw:flex ttw:w-full ttw:items-center ttw:justify-between ttw:gap-4 ttw:rounded-sm ttw:px-2 ttw:py-1.5 ttw:text-left ttw:text-sm ttw:outline-hidden", w === t ? "ttw:bg-accent ttw:text-accent-foreground" : "ttw:text-popover-foreground"),
101
- children: [/* @__PURE__ */ o("span", {
102
- className: "ttw:text-foreground",
103
- children: e.name
104
- }), /* @__PURE__ */ o("span", {
105
- className: "ttw:text-muted-foreground",
106
- children: e.email
107
- })]
108
- }, `${e.name}:${e.email}:${t}`))
109
- }) : null,
110
- h || m.length > 0 || f ? /* @__PURE__ */ o("div", { className: "ttw:-mx-1 ttw:my-1 ttw:h-px ttw:bg-border" }) : null,
111
- /* @__PURE__ */ o("div", {
112
- role: "group",
113
- children: /* @__PURE__ */ s("button", {
114
- id: `${x}-option-${m.length}`,
115
- type: "button",
116
- role: "option",
117
- "aria-selected": w === m.length,
118
- onMouseDown: (e) => e.preventDefault(),
119
- onMouseEnter: () => T(m.length),
120
- onClick: k,
121
- className: n("ttw:flex ttw:w-full ttw:items-center ttw:gap-2 ttw:rounded-sm ttw:px-2 ttw:py-1.5 ttw:text-left ttw:text-sm ttw:text-primary ttw:outline-hidden", w === m.length ? "ttw:bg-accent" : "ttw:bg-transparent"),
122
- children: [/* @__PURE__ */ o(c, { className: "ttw:size-4 ttw:text-primary" }), y.addVendorAction]
123
- })
124
- })
125
- ]
126
- }) : null]
28
+ "aria-expanded": A,
29
+ className: "ttw:flex ttw:h-10 ttw:w-full ttw:items-center ttw:gap-2 ttw:rounded-md ttw:border ttw:border-border ttw:bg-background ttw:px-3 ttw:text-left ttw:text-sm ttw:shadow-xs ttw:outline-none ttw:focus-visible:border-ring ttw:focus-visible:ring-[3px] ttw:focus-visible:ring-ring/50",
30
+ children: [/* @__PURE__ */ h(v, {
31
+ "aria-hidden": !0,
32
+ className: "ttw:size-4 ttw:shrink-0 ttw:opacity-50"
33
+ }), /* @__PURE__ */ h("span", {
34
+ className: d("ttw:min-w-0 ttw:flex-1 ttw:truncate", !x && "ttw:text-muted-foreground"),
35
+ children: x || O.placeholder
36
+ })]
37
+ })
38
+ }), /* @__PURE__ */ h(c, {
39
+ align: "start",
40
+ className: "ttw:w-[var(--radix-popover-trigger-width)] ttw:p-0",
41
+ children: /* @__PURE__ */ g(e, {
42
+ shouldFilter: !1,
43
+ children: [/* @__PURE__ */ h(n, {
44
+ value: x,
45
+ onValueChange: S,
46
+ placeholder: O.placeholder,
47
+ "aria-label": O.placeholder
48
+ }), /* @__PURE__ */ g(i, {
49
+ className: d("ttw:max-h-72", b),
50
+ children: [
51
+ w ? /* @__PURE__ */ g("div", {
52
+ className: "ttw:flex ttw:flex-col ttw:gap-2 ttw:p-2",
53
+ "aria-busy": "true",
54
+ children: [/* @__PURE__ */ h("span", {
55
+ className: "ttw:sr-only",
56
+ children: O.loading
57
+ }), Array.from({ length: y }).map((e, t) => /* @__PURE__ */ g("div", {
58
+ className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4 ttw:px-2 ttw:py-1.5",
59
+ children: [/* @__PURE__ */ h(u, {
60
+ height: 14,
61
+ width: "55%"
62
+ }), /* @__PURE__ */ h(u, {
63
+ height: 14,
64
+ width: "30%"
65
+ })]
66
+ }, t))]
67
+ }) : C.length === 0 && x ? /* @__PURE__ */ h("div", {
68
+ className: d("ttw:flex ttw:items-center ttw:justify-center ttw:py-6 ttw:text-center ttw:text-sm", b),
69
+ children: O.emptyResults
70
+ }) : C.length > 0 ? /* @__PURE__ */ h(t, { children: C.map((e, t) => /* @__PURE__ */ g(r, {
71
+ value: `${e.name} ${e.email} ${t}`,
72
+ onSelect: () => e.onSelect(),
73
+ children: [/* @__PURE__ */ h("span", {
74
+ className: "ttw:text-foreground",
75
+ children: e.name
76
+ }), /* @__PURE__ */ h("span", {
77
+ className: "ttw:ml-auto ttw:text-muted-foreground",
78
+ children: e.email
79
+ })]
80
+ }, `${e.name}:${e.email}:${t}`)) }) : null,
81
+ w || C.length > 0 || x ? /* @__PURE__ */ h(a, {}) : null,
82
+ /* @__PURE__ */ g(r, {
83
+ value: "__add_vendor__",
84
+ onSelect: T,
85
+ className: "ttw:sticky ttw:bottom-0 ttw:bg-popover ttw:text-primary",
86
+ children: [/* @__PURE__ */ h(_, { className: "ttw:size-4 ttw:text-primary" }), O.addVendorAction]
87
+ })
88
+ ]
89
+ })]
90
+ })
91
+ })]
127
92
  })]
128
93
  });
129
94
  }
130
95
  //#endregion
131
- export { f as VendorSearchCombobox, f as default };
96
+ export { x as VendorSearchCombobox, x as default };
@@ -6,7 +6,8 @@ import "./index23.js";
6
6
  var n = {
7
7
  heading: "Who are you paying?",
8
8
  summaryCard: e,
9
- search: t
9
+ search: t,
10
+ noVendorPlaceholder: "No vendor selected"
10
11
  };
11
12
  //#endregion
12
13
  export { n as VENDOR_SECTION_LABELS_EN };
@@ -1,48 +1,53 @@
1
1
  import { Typography as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { InlineErrorAlert as t } from "../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
3
- import "../../../shared/ui/dist/index.js";
4
- import { VendorSummaryCard as n } from "./index19.js";
2
+ import { VendorSummaryCard as t } from "./index19.js";
5
3
  import "./index20.js";
6
- import { VendorSearchCombobox as r } from "./index22.js";
4
+ import { VendorSearchCombobox as n } from "./index22.js";
7
5
  import "./index23.js";
8
- import { VENDOR_SECTION_LABELS_EN as i } from "./index24.js";
9
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
6
+ import { VENDOR_SECTION_LABELS_EN as r } from "./index24.js";
7
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
10
8
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js
11
- function s(s) {
12
- let { onEdit: c, onClear: l, error: u, testId: d, labels: f } = s, p = {
13
- ...i,
14
- ...f,
9
+ function o(o) {
10
+ let { onEdit: s, onClear: c, error: l, testId: u, labels: d, disabled: f } = o, p = {
11
+ ...r,
12
+ ...d,
15
13
  summaryCard: {
16
- ...i.summaryCard,
17
- ...f?.summaryCard
14
+ ...r.summaryCard,
15
+ ...d?.summaryCard
18
16
  },
19
17
  search: {
20
- ...i.search,
21
- ...f?.search
18
+ ...r.search,
19
+ ...d?.search
22
20
  }
23
21
  };
24
- return /* @__PURE__ */ o("section", {
22
+ return /* @__PURE__ */ a("section", {
25
23
  className: "ttw:flex ttw:flex-col ttw:gap-3",
26
- "data-testid": d,
24
+ "data-testid": u,
27
25
  children: [
28
- /* @__PURE__ */ a(e, {
26
+ /* @__PURE__ */ i(e, {
29
27
  component: "h2",
30
28
  variant: "h6",
31
29
  className: "ttw:font-semibold",
32
30
  children: p.heading
33
31
  }),
34
- u ? /* @__PURE__ */ a(t, { children: u }) : null,
35
- s.mode === "resolved" ? /* @__PURE__ */ a(n, {
36
- summary: s.summary,
37
- onEdit: c,
38
- onClear: l,
32
+ o.mode === "resolved" ? /* @__PURE__ */ i(t, {
33
+ summary: o.summary,
34
+ onEdit: s,
35
+ onClear: c,
39
36
  labels: p.summaryCard
40
- }) : s.mode === "selecting" ? /* @__PURE__ */ a(r, {
41
- ...s.search,
37
+ }) : f ? /* @__PURE__ */ i(e, {
38
+ variant: "body2",
39
+ className: "ttw:text-muted-foreground",
40
+ children: p.noVendorPlaceholder
41
+ }) : o.mode === "selecting" ? /* @__PURE__ */ i(n, {
42
+ ...o.search,
42
43
  labels: p.search
43
- }) : s.newVendorForm
44
+ }) : o.newVendorForm,
45
+ l ? /* @__PURE__ */ i("p", {
46
+ className: "ttw:text-sm ttw:text-destructive",
47
+ children: l
48
+ }) : null
44
49
  ]
45
50
  });
46
51
  }
47
52
  //#endregion
48
- export { s as VendorSection, s as default };
53
+ export { o as VendorSection, o as default };
@@ -9,7 +9,7 @@ var r = {
9
9
  closeButton: "Close",
10
10
  menuTrigger: "More actions",
11
11
  cancelButton: "Cancel",
12
- saveDraftButton: "Save as draft",
12
+ saveDraftButton: "Save and close",
13
13
  finalizeButton: "Finalize",
14
14
  hiddenDescription: "Enter the details of the bill you want to pay.",
15
15
  vendorSection: n,