@tesouro/embedded-components-react 0.2.266 → 0.2.269

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 (97) hide show
  1. package/README.md +15 -12
  2. package/dist/experimental/WidgetSuite.d.ts +25 -1
  3. package/dist/experimental/index.d.ts +25 -1
  4. package/dist/index.css +45 -9
  5. package/dist/index.d.ts +46 -22
  6. package/dist/index.js +1 -1
  7. package/dist/lib/AcceptDisclosuresWidget.d.ts +25 -1
  8. package/dist/lib/BalancesWidget.d.ts +24 -0
  9. package/dist/lib/BankAccountOnboardingWidget.d.ts +25 -1
  10. package/dist/lib/BankAccountsWidget.d.ts +25 -1
  11. package/dist/lib/BillPayWidget.d.ts +24 -0
  12. package/dist/lib/BillPayWidget.js +1 -1
  13. package/dist/lib/CardDetailsWidget.d.ts +25 -1
  14. package/dist/lib/CardsWidget.d.ts +25 -1
  15. package/dist/lib/ChartOfAccountsWidget.d.ts +25 -1
  16. package/dist/lib/CounterpartsWidget.d.ts +25 -1
  17. package/dist/lib/CreateCardWidget.d.ts +25 -1
  18. package/dist/lib/ExpenseApprovalPoliciesWidget.d.ts +25 -1
  19. package/dist/lib/ExpenseManagementWidget.d.ts +25 -1
  20. package/dist/lib/ExpenseRequirementsWidget.d.ts +25 -1
  21. package/dist/lib/HelpWidget.d.ts +25 -1
  22. package/dist/lib/InsightsWidget.d.ts +24 -0
  23. package/dist/lib/InvoicingWidget.d.ts +25 -1
  24. package/dist/lib/LinkedAccountsWidget.d.ts +25 -1
  25. package/dist/lib/ProductsWidget.d.ts +25 -1
  26. package/dist/lib/ProfileWidget.d.ts +25 -1
  27. package/dist/lib/ReceiptMatchWidget.d.ts +25 -1
  28. package/dist/lib/ReceivablesWidget.d.ts +25 -1
  29. package/dist/lib/SettingsWidget.d.ts +25 -1
  30. package/dist/lib/TagsWidget.d.ts +25 -1
  31. package/dist/lib/TeamWidget.d.ts +25 -1
  32. package/dist/lib/TransfersWidget.d.ts +24 -0
  33. package/dist/lib/WidgetProvider.d.ts +25 -1
  34. package/dist/lib/WidgetProviderPublic.d.ts +24 -0
  35. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js +9 -8
  36. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index17.js +122 -121
  37. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index8.js +9 -8
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +6 -6
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +99 -7
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +7 -97
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +99 -4
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +4 -4
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +2 -41
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +44 -1
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +1 -50
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +48 -6
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +9 -5
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +8 -91
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +6 -2
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +7 -3
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +100 -6
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +3 -9
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +6 -83
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +9 -3
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +83 -6
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +2 -111
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +8 -1
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +104 -16
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +1 -0
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +25 -0
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +37 -27
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +15 -116
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +126 -31
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +32 -69
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +0 -3
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +34 -69
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +4 -0
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +261 -181
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +32 -33
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index7.js +2 -2
  71. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index6.js +9 -8
  72. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index8.js +9 -8
  73. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js +9 -8
  74. package/dist/libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index7.js +94 -93
  75. package/dist/libs/tesouro-embedded-components-react/expense-approval-policies-widget/feature/dist/lib/ExpenseApprovalPoliciesWidgetFeature.js +7 -6
  76. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index3.js +9 -8
  77. package/dist/libs/tesouro-embedded-components-react/expense-receipt-match-widget/feature/dist/lib/ReceiptMatchWidget.js +12 -11
  78. package/dist/libs/tesouro-embedded-components-react/expense-requirements-widget/feature/dist/lib/ExpenseRequirementsWidget.js +7 -6
  79. package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/feature/dist/index8.js +9 -8
  80. package/dist/libs/tesouro-embedded-components-react/help-widget/feature/dist/index3.js +9 -8
  81. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +9 -8
  82. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index3.js +10 -9
  83. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index9.js +9 -8
  84. package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/index8.js +9 -8
  85. package/dist/libs/tesouro-embedded-components-react/profile-widget/feature/dist/index4.js +9 -8
  86. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +10 -9
  87. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +22 -21
  88. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/widgetGatewayHosts.js +14 -0
  89. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js +76 -67
  90. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +107 -101
  91. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  92. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/client.js +12 -4
  93. package/dist/libs/tesouro-embedded-components-react/tags-widget/feature/dist/index11.js +9 -8
  94. package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index17.js +106 -105
  95. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index5.js +1 -1
  96. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index6.js +9 -8
  97. package/package.json +1 -1
@@ -1,205 +1,285 @@
1
- import { Button as e, Input as t, Label as n, Select as r, SelectContent as i, SelectItem as a, SelectTrigger as o, SelectValue as s, Typography as c } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { LINE_ITEMS_SECTION_LABELS_EN as l } from "./index15.js";
3
- import { useId as u } from "react";
4
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
5
- import { Minus as p, Plus as m, Trash2 as h } from "lucide-react";
1
+ import { Button as e, Input as t, InputGroup as n, InputGroupAddon as r, InputGroupInput as i, Label as a, Select as o, SelectContent as s, SelectItem as c, SelectTrigger as l, SelectValue as u, Typography as d } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { LINE_ITEMS_SECTION_LABELS_EN as f } from "./index15.js";
3
+ import { useId as p } from "react";
4
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
5
+ import { Minus as g, Plus as _, Trash2 as v } from "lucide-react";
6
6
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js
7
- function g({ items: g, glCodeOptions: _, totalAmountLabel: v, onAddLineItem: y, errors: b, disabled: x, testId: S, labels: C }) {
8
- let w = {
9
- ...l,
10
- ...C
11
- }, T = u(), E = g.length > 1;
12
- return /* @__PURE__ */ f("section", {
7
+ function y({ items: y, glCodeOptions: b, discount: x, onDiscountChange: S, tax: C, onTaxChange: w, total: T, onTotalChange: E, onAddLineItem: D, errors: O, disabled: k, testId: A, labels: j }) {
8
+ let M = {
9
+ ...f,
10
+ ...j
11
+ }, N = p(), P = y.length > 1;
12
+ return /* @__PURE__ */ h("section", {
13
13
  className: "ttw:flex ttw:flex-col ttw:gap-3",
14
- "data-testid": S,
14
+ "data-testid": A,
15
15
  children: [
16
- /* @__PURE__ */ d(c, {
16
+ /* @__PURE__ */ m(d, {
17
17
  component: "h2",
18
18
  variant: "h6",
19
19
  className: "ttw:font-semibold",
20
- children: w.heading
20
+ children: M.heading
21
21
  }),
22
- /* @__PURE__ */ d("p", {
22
+ /* @__PURE__ */ m("p", {
23
23
  className: "ttw:text-sm ttw:text-muted-foreground",
24
- children: w.helpText
24
+ children: M.helpText
25
25
  }),
26
- g.map((c, l) => {
27
- let u = `${T}-${c.id}`, g = b?.[c.id], v = (e) => `${u}-${e}-error`, y = (e) => g?.[e], S = (e) => {
28
- let t = y(e);
29
- return t ? /* @__PURE__ */ d("p", {
30
- id: v(e),
26
+ y.map((d, f) => {
27
+ let p = `${N}-${d.id}`, y = O?.[d.id], x = (e) => `${p}-${e}-error`, S = (e) => y?.[e], C = (e) => {
28
+ let t = S(e);
29
+ return t ? /* @__PURE__ */ m("p", {
30
+ id: x(e),
31
31
  className: "ttw:text-sm ttw:text-destructive",
32
32
  children: t
33
33
  }) : null;
34
34
  };
35
- return /* @__PURE__ */ d("div", {
35
+ return /* @__PURE__ */ m("div", {
36
36
  className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-muted/30 ttw:p-4",
37
- children: /* @__PURE__ */ f("div", {
38
- className: "ttw:flex ttw:items-start ttw:gap-2",
37
+ children: /* @__PURE__ */ h("div", {
38
+ className: "ttw:@container/line-item ttw:flex ttw:flex-col ttw:gap-3",
39
39
  children: [
40
- E ? /* @__PURE__ */ f("span", {
41
- className: "ttw:pt-7 ttw:text-sm ttw:text-muted-foreground",
42
- children: [l + 1, "."]
43
- }) : null,
44
- /* @__PURE__ */ f("div", {
45
- className: "ttw:flex ttw:flex-1 ttw:flex-col ttw:gap-3",
46
- children: [/* @__PURE__ */ f("div", {
47
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
48
- children: [
49
- /* @__PURE__ */ d(n, {
50
- htmlFor: `${u}-description`,
51
- children: w.description
52
- }),
53
- /* @__PURE__ */ d(t, {
54
- id: `${u}-description`,
55
- placeholder: w.descriptionPlaceholder,
56
- value: c.description,
57
- disabled: x,
58
- "aria-invalid": y("description") ? !0 : void 0,
59
- "aria-describedby": y("description") ? v("description") : void 0,
60
- onChange: (e) => c.onChange({ description: e.target.value })
61
- }),
62
- S("description")
63
- ]
64
- }), /* @__PURE__ */ f("div", {
65
- className: "ttw:grid ttw:grid-cols-4 ttw:gap-3",
66
- children: [
67
- /* @__PURE__ */ f("div", {
68
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
69
- children: [
70
- /* @__PURE__ */ d(n, {
71
- htmlFor: `${u}-gl-code`,
72
- children: w.glCode
73
- }),
74
- /* @__PURE__ */ f(r, {
75
- value: c.glCode,
76
- disabled: x,
77
- onValueChange: (e) => c.onChange({ glCode: e }),
78
- children: [/* @__PURE__ */ d(o, {
79
- id: `${u}-gl-code`,
80
- "aria-invalid": y("glCode") ? !0 : void 0,
81
- "aria-describedby": y("glCode") ? v("glCode") : void 0,
82
- children: /* @__PURE__ */ d(s, { placeholder: w.glCodePlaceholder })
83
- }), /* @__PURE__ */ d(i, { children: _.map((e) => /* @__PURE__ */ d(a, {
84
- value: e.value,
85
- children: e.label
86
- }, e.value)) })]
87
- }),
88
- S("glCode")
89
- ]
90
- }),
91
- /* @__PURE__ */ f("div", {
92
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
93
- children: [
94
- /* @__PURE__ */ d(n, {
95
- htmlFor: `${u}-quantity`,
96
- children: w.quantity
97
- }),
98
- /* @__PURE__ */ f("div", {
99
- className: "ttw:flex ttw:items-center ttw:gap-1",
100
- children: [
101
- /* @__PURE__ */ d(e, {
102
- type: "button",
103
- variant: "outline",
104
- size: "icon",
105
- disabled: x,
106
- "aria-label": w.decreaseQuantity(l + 1),
107
- onClick: () => c.onQuantityStep(-1),
108
- children: /* @__PURE__ */ d(p, { className: "ttw:size-3.5" })
109
- }),
110
- /* @__PURE__ */ d(t, {
111
- id: `${u}-quantity`,
112
- inputMode: "decimal",
113
- className: "ttw:text-center",
114
- value: c.quantity,
115
- disabled: x,
116
- "aria-invalid": y("quantity") ? !0 : void 0,
117
- "aria-describedby": y("quantity") ? v("quantity") : void 0,
118
- onChange: (e) => c.onChange({ quantity: e.target.value })
119
- }),
120
- /* @__PURE__ */ d(e, {
121
- type: "button",
122
- variant: "outline",
123
- size: "icon",
124
- disabled: x,
125
- "aria-label": w.increaseQuantity(l + 1),
126
- onClick: () => c.onQuantityStep(1),
127
- children: /* @__PURE__ */ d(m, { className: "ttw:size-3.5" })
128
- })
129
- ]
130
- }),
131
- S("quantity")
132
- ]
133
- }),
134
- /* @__PURE__ */ f("div", {
135
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
136
- children: [
137
- /* @__PURE__ */ d(n, {
138
- htmlFor: `${u}-price`,
139
- children: w.price
140
- }),
141
- /* @__PURE__ */ d(t, {
142
- id: `${u}-price`,
143
- inputMode: "decimal",
144
- value: c.price,
145
- disabled: x,
146
- "aria-invalid": y("price") ? !0 : void 0,
147
- "aria-describedby": y("price") ? v("price") : void 0,
148
- onChange: (e) => c.onChange({ price: e.target.value })
149
- }),
150
- S("price")
151
- ]
152
- }),
153
- /* @__PURE__ */ f("div", {
154
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
155
- children: [
156
- /* @__PURE__ */ d(n, {
157
- htmlFor: `${u}-amount`,
158
- children: w.amount
159
- }),
160
- /* @__PURE__ */ d(t, {
161
- id: `${u}-amount`,
162
- inputMode: "decimal",
163
- value: c.amount,
164
- disabled: x,
165
- "aria-invalid": y("amount") ? !0 : void 0,
166
- "aria-describedby": y("amount") ? v("amount") : void 0,
167
- onChange: (e) => c.onChange({ amount: e.target.value })
168
- }),
169
- S("amount")
170
- ]
171
- })
172
- ]
173
- })]
40
+ /* @__PURE__ */ h("div", {
41
+ className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-2",
42
+ children: [/* @__PURE__ */ h("div", {
43
+ className: "ttw:flex ttw:items-center ttw:gap-2",
44
+ children: [P ? /* @__PURE__ */ h("span", {
45
+ className: "ttw:text-sm ttw:text-muted-foreground",
46
+ children: [f + 1, "."]
47
+ }) : null, /* @__PURE__ */ m(a, {
48
+ htmlFor: `${p}-description`,
49
+ children: M.description
50
+ })]
51
+ }), P ? /* @__PURE__ */ m(e, {
52
+ type: "button",
53
+ variant: "ghost",
54
+ size: "icon",
55
+ disabled: k,
56
+ "aria-label": M.removeLineItem(f + 1),
57
+ onClick: d.onRemove,
58
+ children: /* @__PURE__ */ m(v, { className: "ttw:size-4" })
59
+ }) : null]
174
60
  }),
175
- E ? /* @__PURE__ */ d(e, {
176
- type: "button",
177
- variant: "ghost",
178
- size: "icon",
179
- disabled: x,
180
- "aria-label": w.removeLineItem(l + 1),
181
- onClick: c.onRemove,
182
- children: /* @__PURE__ */ d(h, { className: "ttw:size-4" })
183
- }) : null
61
+ /* @__PURE__ */ h("div", {
62
+ className: "ttw:flex ttw:flex-col ttw:gap-1.5",
63
+ children: [/* @__PURE__ */ m(t, {
64
+ id: `${p}-description`,
65
+ placeholder: M.descriptionPlaceholder,
66
+ value: d.description,
67
+ disabled: k,
68
+ "aria-invalid": S("description") ? !0 : void 0,
69
+ "aria-describedby": S("description") ? x("description") : void 0,
70
+ onChange: (e) => d.onChange({ description: e.target.value })
71
+ }), C("description")]
72
+ }),
73
+ /* @__PURE__ */ h("div", {
74
+ className: "ttw:grid ttw:grid-cols-3 ttw:@lg/line-item:grid-cols-6 ttw:gap-3",
75
+ children: [
76
+ /* @__PURE__ */ h("div", {
77
+ className: "ttw:col-span-3 ttw:flex ttw:flex-col ttw:gap-1.5",
78
+ children: [
79
+ /* @__PURE__ */ m(a, {
80
+ htmlFor: `${p}-gl-code`,
81
+ children: M.glCode
82
+ }),
83
+ /* @__PURE__ */ h(o, {
84
+ value: d.glCode,
85
+ disabled: k,
86
+ onValueChange: (e) => d.onChange({ glCode: e }),
87
+ children: [/* @__PURE__ */ m(l, {
88
+ id: `${p}-gl-code`,
89
+ "aria-invalid": S("glCode") ? !0 : void 0,
90
+ "aria-describedby": S("glCode") ? x("glCode") : void 0,
91
+ children: /* @__PURE__ */ m(u, { placeholder: M.glCodePlaceholder })
92
+ }), /* @__PURE__ */ m(s, { children: b.map((e) => /* @__PURE__ */ m(c, {
93
+ value: e.value,
94
+ children: e.label
95
+ }, e.value)) })]
96
+ }),
97
+ C("glCode")
98
+ ]
99
+ }),
100
+ /* @__PURE__ */ h("div", {
101
+ className: "ttw:col-span-1 ttw:flex ttw:flex-col ttw:gap-1.5",
102
+ children: [
103
+ /* @__PURE__ */ m(a, {
104
+ htmlFor: `${p}-quantity`,
105
+ children: M.quantity
106
+ }),
107
+ /* @__PURE__ */ h(n, {
108
+ className: "ttw:h-9 ttw:rounded-md ttw:border ttw:border-input ttw:shadow-xs ttw:has-[:focus-visible]:border-ring ttw:has-[:focus-visible]:ring-[3px] ttw:has-[:focus-visible]:ring-ring/50 ttw:has-[[aria-invalid=true]]:border-destructive ttw:has-[[aria-invalid=true]]:ring-destructive/20",
109
+ children: [
110
+ /* @__PURE__ */ m(e, {
111
+ type: "button",
112
+ variant: "ghost",
113
+ size: "icon",
114
+ className: "ttw:h-full ttw:shrink-0 ttw:rounded-r-none",
115
+ disabled: k,
116
+ "aria-label": M.decreaseQuantity(f + 1),
117
+ onClick: () => d.onQuantityStep(-1),
118
+ children: /* @__PURE__ */ m(g, { className: "ttw:size-3.5" })
119
+ }),
120
+ /* @__PURE__ */ m(i, {
121
+ id: `${p}-quantity`,
122
+ inputMode: "decimal",
123
+ className: "ttw:min-w-0 ttw:flex-1 ttw:rounded-none ttw:border-0 ttw:text-center ttw:shadow-none ttw:focus-visible:ring-0",
124
+ value: d.quantity,
125
+ disabled: k,
126
+ "aria-invalid": S("quantity") ? !0 : void 0,
127
+ "aria-describedby": S("quantity") ? x("quantity") : void 0,
128
+ onChange: (e) => d.onChange({ quantity: e.target.value })
129
+ }),
130
+ /* @__PURE__ */ m(e, {
131
+ type: "button",
132
+ variant: "ghost",
133
+ size: "icon",
134
+ className: "ttw:h-full ttw:shrink-0 ttw:rounded-l-none",
135
+ disabled: k,
136
+ "aria-label": M.increaseQuantity(f + 1),
137
+ onClick: () => d.onQuantityStep(1),
138
+ children: /* @__PURE__ */ m(_, { className: "ttw:size-3.5" })
139
+ })
140
+ ]
141
+ }),
142
+ C("quantity")
143
+ ]
144
+ }),
145
+ /* @__PURE__ */ h("div", {
146
+ className: "ttw:col-span-1 ttw:flex ttw:flex-col ttw:gap-1.5",
147
+ children: [
148
+ /* @__PURE__ */ m(a, {
149
+ htmlFor: `${p}-price`,
150
+ children: M.price
151
+ }),
152
+ /* @__PURE__ */ h(n, { children: [/* @__PURE__ */ m(r, {
153
+ align: "inline-start",
154
+ "aria-hidden": !0,
155
+ children: M.currencySymbol
156
+ }), /* @__PURE__ */ m(i, {
157
+ id: `${p}-price`,
158
+ "data-has-start-addon": !0,
159
+ inputMode: "decimal",
160
+ className: "ttw:text-right ttw:aria-invalid:border-destructive ttw:aria-invalid:ring-destructive/20",
161
+ value: d.price,
162
+ disabled: k,
163
+ "aria-invalid": S("price") ? !0 : void 0,
164
+ "aria-describedby": S("price") ? x("price") : void 0,
165
+ onChange: (e) => d.onChange({ price: e.target.value })
166
+ })] }),
167
+ C("price")
168
+ ]
169
+ }),
170
+ /* @__PURE__ */ h("div", {
171
+ className: "ttw:col-span-1 ttw:flex ttw:flex-col ttw:gap-1.5",
172
+ children: [
173
+ /* @__PURE__ */ m(a, {
174
+ htmlFor: `${p}-amount`,
175
+ children: M.amount
176
+ }),
177
+ /* @__PURE__ */ h(n, { children: [/* @__PURE__ */ m(r, {
178
+ align: "inline-start",
179
+ "aria-hidden": !0,
180
+ children: M.currencySymbol
181
+ }), /* @__PURE__ */ m(i, {
182
+ id: `${p}-amount`,
183
+ "data-has-start-addon": !0,
184
+ inputMode: "decimal",
185
+ className: "ttw:text-right ttw:aria-invalid:border-destructive ttw:aria-invalid:ring-destructive/20",
186
+ value: d.amount,
187
+ disabled: k,
188
+ "aria-invalid": S("amount") ? !0 : void 0,
189
+ "aria-describedby": S("amount") ? x("amount") : void 0,
190
+ onChange: (e) => d.onChange({ amount: e.target.value })
191
+ })] }),
192
+ C("amount")
193
+ ]
194
+ })
195
+ ]
196
+ })
184
197
  ]
185
198
  })
186
- }, c.id);
199
+ }, d.id);
200
+ }),
201
+ /* @__PURE__ */ m(e, {
202
+ type: "button",
203
+ variant: "link",
204
+ disabled: k,
205
+ className: "ttw:self-start",
206
+ onClick: D,
207
+ children: M.addLineItem
187
208
  }),
188
- /* @__PURE__ */ f("div", {
189
- className: "ttw:flex ttw:items-center ttw:justify-between",
190
- children: [/* @__PURE__ */ d(e, {
191
- type: "button",
192
- variant: "link",
193
- disabled: x,
194
- onClick: y,
195
- children: w.addLineItem
196
- }), /* @__PURE__ */ d("span", {
197
- className: "ttw:text-sm ttw:text-foreground",
198
- children: v
199
- })]
209
+ /* @__PURE__ */ h("div", {
210
+ className: "ttw:flex ttw:flex-col ttw:gap-2 ttw:border-t ttw:border-border ttw:pt-3",
211
+ children: [
212
+ /* @__PURE__ */ h("div", {
213
+ className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4",
214
+ children: [/* @__PURE__ */ m(a, {
215
+ htmlFor: `${N}-discount`,
216
+ children: M.discount
217
+ }), /* @__PURE__ */ h(n, {
218
+ className: "ttw:w-36",
219
+ children: [/* @__PURE__ */ m(r, {
220
+ align: "inline-start",
221
+ "aria-hidden": !0,
222
+ children: M.currencySymbol
223
+ }), /* @__PURE__ */ m(i, {
224
+ id: `${N}-discount`,
225
+ "data-has-start-addon": !0,
226
+ inputMode: "decimal",
227
+ className: "ttw:text-right",
228
+ value: x,
229
+ disabled: k,
230
+ onChange: (e) => S(e.target.value)
231
+ })]
232
+ })]
233
+ }),
234
+ /* @__PURE__ */ h("div", {
235
+ className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4",
236
+ children: [/* @__PURE__ */ m(a, {
237
+ htmlFor: `${N}-tax`,
238
+ children: M.tax
239
+ }), /* @__PURE__ */ h(n, {
240
+ className: "ttw:w-36",
241
+ children: [/* @__PURE__ */ m(r, {
242
+ align: "inline-start",
243
+ "aria-hidden": !0,
244
+ children: M.currencySymbol
245
+ }), /* @__PURE__ */ m(i, {
246
+ id: `${N}-tax`,
247
+ "data-has-start-addon": !0,
248
+ inputMode: "decimal",
249
+ className: "ttw:text-right",
250
+ value: C,
251
+ disabled: k,
252
+ onChange: (e) => w(e.target.value)
253
+ })]
254
+ })]
255
+ }),
256
+ /* @__PURE__ */ h("div", {
257
+ className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4",
258
+ children: [/* @__PURE__ */ m(a, {
259
+ htmlFor: `${N}-total`,
260
+ className: "ttw:font-semibold",
261
+ children: M.totalAmount
262
+ }), /* @__PURE__ */ h(n, {
263
+ className: "ttw:w-36",
264
+ children: [/* @__PURE__ */ m(r, {
265
+ align: "inline-start",
266
+ "aria-hidden": !0,
267
+ children: M.currencySymbol
268
+ }), /* @__PURE__ */ m(i, {
269
+ id: `${N}-total`,
270
+ "data-has-start-addon": !0,
271
+ inputMode: "decimal",
272
+ className: "ttw:text-right ttw:font-semibold",
273
+ value: T,
274
+ disabled: k,
275
+ onChange: (e) => E(e.target.value)
276
+ })]
277
+ })]
278
+ })
279
+ ]
200
280
  })
201
281
  ]
202
282
  });
203
283
  }
204
284
  //#endregion
205
- export { g as LineItemsSection, g as default };
285
+ export { y as LineItemsSection, y as default };
@@ -11,38 +11,38 @@ import { BILL_CREATE_SCREEN_LABELS_EN as m } from "./index27.js";
11
11
  import { jsx as h, jsxs as g } from "react/jsx-runtime";
12
12
  import { MoreVertical as _, X as v } from "lucide-react";
13
13
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js
14
- function y({ open: y, onOpenChange: b, title: x, subtitle: S, notice: C, vendor: w, values: T, errors: E, onChange: D, paymentTermOptions: O, lineItems: k, documentPanel: A, menuItems: j, isLineItemsLoading: M, isSavingDraft: N, isFinalizing: P, onCancel: F, onSaveDraft: I, onFinalize: L, testId: R, labels: z }) {
15
- let B = {
14
+ function y({ open: y, onOpenChange: b, title: x, subtitle: S, notice: C, vendor: w, values: T, errors: E, onChange: D, lineItems: O, documentPanel: k, menuItems: A, isLineItemsLoading: j, isSavingDraft: M, isFinalizing: N, onCancel: P, onSaveDraft: F, onFinalize: I, testId: L, labels: R }) {
15
+ let z = {
16
16
  ...m,
17
- ...z,
17
+ ...R,
18
18
  vendorSection: {
19
19
  ...m.vendorSection,
20
- ...z?.vendorSection,
20
+ ...R?.vendorSection,
21
21
  summaryCard: {
22
22
  ...m.vendorSection.summaryCard,
23
- ...z?.vendorSection?.summaryCard
23
+ ...R?.vendorSection?.summaryCard
24
24
  },
25
25
  search: {
26
26
  ...m.vendorSection.search,
27
- ...z?.vendorSection?.search
27
+ ...R?.vendorSection?.search
28
28
  }
29
29
  },
30
30
  detailsFields: {
31
31
  ...m.detailsFields,
32
- ...z?.detailsFields
32
+ ...R?.detailsFields
33
33
  },
34
34
  lineItems: {
35
35
  ...m.lineItems,
36
- ...z?.lineItems
36
+ ...R?.lineItems
37
37
  }
38
38
  };
39
39
  return /* @__PURE__ */ h(t, {
40
40
  open: y,
41
- onOpenChange: (e) => e ? b(e) : F(),
41
+ onOpenChange: (e) => e ? b(e) : P(),
42
42
  children: /* @__PURE__ */ g(n, {
43
43
  showCloseButton: !1,
44
44
  className: "ttw:flex ttw:h-[calc(100vh-3rem)] ttw:w-[calc(100vw-3rem)] ttw:max-w-[calc(100vw-3rem)] ttw:flex-col ttw:gap-0 ttw:p-0",
45
- "data-testid": R,
45
+ "data-testid": L,
46
46
  children: [
47
47
  /* @__PURE__ */ g(i, {
48
48
  className: "ttw:flex ttw:flex-row ttw:items-start ttw:justify-between ttw:border-b ttw:border-border ttw:px-6 ttw:py-4",
@@ -59,23 +59,23 @@ function y({ open: y, onOpenChange: b, title: x, subtitle: S, notice: C, vendor:
59
59
  }) : null,
60
60
  /* @__PURE__ */ h(r, {
61
61
  className: "ttw:sr-only",
62
- children: B.hiddenDescription
62
+ children: z.hiddenDescription
63
63
  })
64
64
  ]
65
65
  }), /* @__PURE__ */ g("div", {
66
66
  className: "ttw:flex ttw:items-center ttw:gap-1",
67
- children: [j && j.length > 0 ? /* @__PURE__ */ g(o, { children: [/* @__PURE__ */ h(l, {
67
+ children: [A && A.length > 0 ? /* @__PURE__ */ g(o, { children: [/* @__PURE__ */ h(l, {
68
68
  asChild: !0,
69
69
  children: /* @__PURE__ */ h(e, {
70
70
  type: "button",
71
71
  variant: "ghost",
72
72
  size: "icon",
73
- "aria-label": B.menuTrigger,
73
+ "aria-label": z.menuTrigger,
74
74
  children: /* @__PURE__ */ h(_, { className: "ttw:size-4" })
75
75
  })
76
76
  }), /* @__PURE__ */ h(s, {
77
77
  align: "end",
78
- children: j.map((e) => /* @__PURE__ */ h(c, {
78
+ children: A.map((e) => /* @__PURE__ */ h(c, {
79
79
  variant: e.destructive ? "destructive" : void 0,
80
80
  onSelect: e.onSelect,
81
81
  children: e.label
@@ -84,8 +84,8 @@ function y({ open: y, onOpenChange: b, title: x, subtitle: S, notice: C, vendor:
84
84
  type: "button",
85
85
  variant: "ghost",
86
86
  size: "icon",
87
- "aria-label": B.closeButton,
88
- onClick: F,
87
+ "aria-label": z.closeButton,
88
+ onClick: P,
89
89
  children: /* @__PURE__ */ h(v, { className: "ttw:size-4" })
90
90
  })]
91
91
  })]
@@ -99,24 +99,23 @@ function y({ open: y, onOpenChange: b, title: x, subtitle: S, notice: C, vendor:
99
99
  C,
100
100
  /* @__PURE__ */ h(p, {
101
101
  ...w,
102
- labels: B.vendorSection
102
+ labels: z.vendorSection
103
103
  }),
104
104
  /* @__PURE__ */ h(d, {
105
105
  values: T,
106
106
  errors: E,
107
107
  onChange: D,
108
- paymentTermOptions: O,
109
- labels: B.detailsFields
108
+ labels: z.detailsFields
110
109
  }),
111
110
  /* @__PURE__ */ h(f, {
112
- ...k,
113
- disabled: k.disabled || M,
114
- labels: B.lineItems
111
+ ...O,
112
+ disabled: O.disabled || j,
113
+ labels: z.lineItems
115
114
  })
116
115
  ]
117
116
  }), /* @__PURE__ */ h("div", {
118
117
  className: "ttw:overflow-y-auto ttw:bg-muted/30 ttw:px-6 ttw:py-6",
119
- children: A
118
+ children: k
120
119
  })]
121
120
  }),
122
121
  /* @__PURE__ */ g("div", {
@@ -125,23 +124,23 @@ function y({ open: y, onOpenChange: b, title: x, subtitle: S, notice: C, vendor:
125
124
  /* @__PURE__ */ h(e, {
126
125
  type: "button",
127
126
  variant: "ghost",
128
- onClick: F,
129
- children: B.cancelButton
127
+ onClick: P,
128
+ children: z.cancelButton
130
129
  }),
131
130
  /* @__PURE__ */ h(e, {
132
131
  type: "button",
133
132
  variant: "secondary",
134
- onClick: I,
135
- loading: N,
136
- disabled: P || M,
137
- children: B.saveDraftButton
133
+ onClick: F,
134
+ loading: M,
135
+ disabled: N || j,
136
+ children: z.saveDraftButton
138
137
  }),
139
138
  /* @__PURE__ */ h(e, {
140
139
  type: "button",
141
- onClick: L,
142
- loading: P,
143
- disabled: N || M,
144
- children: B.finalizeButton
140
+ onClick: I,
141
+ loading: N,
142
+ disabled: M || j,
143
+ children: z.finalizeButton
145
144
  })
146
145
  ]
147
146
  })
@@ -33,8 +33,8 @@ function c({ emailAddress: c, onCopyEmail: l, onFilesSelected: u, accept: d, upl
33
33
  type: "button",
34
34
  onClick: l,
35
35
  "aria-label": _.copyEmail,
36
- className: "ttw:inline-flex ttw:items-center ttw:gap-1 ttw:align-baseline ttw:text-primary ttw:hover:underline",
37
- children: [/* @__PURE__ */ a(s, { className: "ttw:size-3.5" }), c]
36
+ className: "ttw:inline-flex ttw:items-center ttw:gap-1.5 ttw:rounded-md ttw:border ttw:border-input ttw:px-2 ttw:py-1 ttw:align-middle ttw:text-foreground ttw:hover:bg-accent",
37
+ children: [c, /* @__PURE__ */ a(s, { className: "ttw:size-3.5 ttw:text-muted-foreground" })]
38
38
  }),
39
39
  " ",
40
40
  _.subcopySuffix
@@ -83,20 +83,21 @@ function w({ cardId: r, cardProgram: l, onClose: w, labels: T, featureLabels: E,
83
83
  onRetry: N === d.Supported ? G : void 0
84
84
  })] });
85
85
  }
86
- function T({ baseUrl: e, widgetToken: t, organizationId: n, configClient: i, linkComponent: a, implementation: o, uiFramework: s, errorFallback: c, onError: u, analytics: d, ...f }) {
86
+ function T({ baseUrl: e, widgetToken: t, organizationId: n, configClient: i, gatewayRouting: a, linkComponent: o, implementation: s, uiFramework: c, errorFallback: u, onError: d, analytics: f, ...p }) {
87
87
  return /* @__PURE__ */ S(r, {
88
88
  widgetName: l,
89
89
  baseUrl: e,
90
90
  widgetToken: t,
91
91
  organizationId: n,
92
92
  configClient: i,
93
- linkComponent: a,
94
- implementation: o,
95
- uiFramework: s,
96
- errorFallback: c,
97
- onError: u,
98
- analytics: d,
99
- children: /* @__PURE__ */ S(w, { ...f })
93
+ gatewayRouting: a,
94
+ linkComponent: o,
95
+ implementation: s,
96
+ uiFramework: c,
97
+ errorFallback: u,
98
+ onError: d,
99
+ analytics: f,
100
+ children: /* @__PURE__ */ S(w, { ...p })
100
101
  });
101
102
  }
102
103
  //#endregion