@tesouro/embedded-components-react 0.3.58 → 0.3.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +6 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +4 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +105 -93
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +220 -82
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +8 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +37 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +112 -90
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +10 -152
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +160 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +2 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +41 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +5 -90
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +92 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +2 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +16 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +1 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +79 -261
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +262 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +13 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +6 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +39 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +2 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +36 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +10 -199
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +201 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +3 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +15 -345
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +345 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +6 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +6 -91
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +93 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +2 -121
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +118 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +24 -87
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +89 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +5 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +30 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +5 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +34 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +2 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +10 -104
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +105 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +2 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +15 -123
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +125 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +2 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +14 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +7 -167
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +170 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +2 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +11 -105
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +108 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +2 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +8 -45
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +47 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index22.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index479.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index553.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +0 -2
|
@@ -4,32 +4,39 @@ import { useId as v } from "react";
|
|
|
4
4
|
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
5
5
|
import { CircleAlert as x, Minus as S, Plus as C, Trash2 as w, X as T } from "lucide-react";
|
|
6
6
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js
|
|
7
|
-
function E({ items: E, glCodeOptions: D, glCodeDisabled: O, glCodeUnavailableMessage: k, discount: A, onDiscountChange: j, tax: M, onTaxChange: N, total: P, onTotalChange: F, onAddLineItem: I, errors: L,
|
|
8
|
-
let
|
|
7
|
+
function E({ items: E, glCodeOptions: D, glCodeDisabled: O, glCodeUnavailableMessage: k, discount: A, onDiscountChange: j, tax: M, onTaxChange: N, total: P, onTotalChange: F, onAddLineItem: I, errors: L, totalsErrors: R, disabled: z, testId: B, labels: V }) {
|
|
8
|
+
let H = {
|
|
9
9
|
..._,
|
|
10
|
-
...
|
|
11
|
-
},
|
|
10
|
+
...V
|
|
11
|
+
}, U = v(), W = E.length > 1, G = k ? `${U}-gl-code-unavailable` : void 0, K = (e) => `${U}-${e}-error`, q = (e) => {
|
|
12
|
+
let t = R?.[e];
|
|
13
|
+
return t ? /* @__PURE__ */ y("p", {
|
|
14
|
+
id: K(e),
|
|
15
|
+
className: "ttw:text-sm ttw:text-destructive ttw:text-right",
|
|
16
|
+
children: t
|
|
17
|
+
}) : null;
|
|
18
|
+
};
|
|
12
19
|
return /* @__PURE__ */ b("section", {
|
|
13
20
|
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
14
|
-
"data-testid":
|
|
21
|
+
"data-testid": B,
|
|
15
22
|
children: [
|
|
16
23
|
/* @__PURE__ */ y(h, {
|
|
17
24
|
component: "h2",
|
|
18
25
|
variant: "h6",
|
|
19
26
|
className: "ttw:font-semibold",
|
|
20
|
-
children:
|
|
27
|
+
children: H.heading
|
|
21
28
|
}),
|
|
22
29
|
/* @__PURE__ */ y("p", {
|
|
23
30
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
24
|
-
children:
|
|
31
|
+
children: H.helpText
|
|
25
32
|
}),
|
|
26
33
|
k ? /* @__PURE__ */ y("span", {
|
|
27
|
-
id:
|
|
34
|
+
id: G,
|
|
28
35
|
className: "ttw:sr-only",
|
|
29
36
|
children: k
|
|
30
37
|
}) : null,
|
|
31
38
|
E.map((h, _) => {
|
|
32
|
-
let v = `${
|
|
39
|
+
let v = `${U}-${h.id}`, E = L?.[h.id], A = (e) => `${v}-${e}-error`, j = (e) => E?.[e], M = (e) => {
|
|
33
40
|
let t = j(e);
|
|
34
41
|
return t ? /* @__PURE__ */ y("p", {
|
|
35
42
|
id: A(e),
|
|
@@ -46,19 +53,19 @@ function E({ items: E, glCodeOptions: D, glCodeDisabled: O, glCodeUnavailableMes
|
|
|
46
53
|
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-2",
|
|
47
54
|
children: [/* @__PURE__ */ b("div", {
|
|
48
55
|
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
49
|
-
children: [
|
|
56
|
+
children: [W ? /* @__PURE__ */ b("span", {
|
|
50
57
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
51
58
|
children: [_ + 1, "."]
|
|
52
59
|
}) : null, /* @__PURE__ */ y(a, {
|
|
53
60
|
htmlFor: `${v}-description`,
|
|
54
|
-
children:
|
|
61
|
+
children: H.description
|
|
55
62
|
})]
|
|
56
|
-
}),
|
|
63
|
+
}), W ? /* @__PURE__ */ y(e, {
|
|
57
64
|
type: "button",
|
|
58
65
|
variant: "ghost",
|
|
59
66
|
size: "icon",
|
|
60
|
-
disabled:
|
|
61
|
-
"aria-label":
|
|
67
|
+
disabled: z,
|
|
68
|
+
"aria-label": H.removeLineItem(_ + 1),
|
|
62
69
|
onClick: h.onRemove,
|
|
63
70
|
children: /* @__PURE__ */ y(w, { className: "ttw:size-4" })
|
|
64
71
|
}) : null]
|
|
@@ -67,9 +74,9 @@ function E({ items: E, glCodeOptions: D, glCodeDisabled: O, glCodeUnavailableMes
|
|
|
67
74
|
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
68
75
|
children: [/* @__PURE__ */ y(t, {
|
|
69
76
|
id: `${v}-description`,
|
|
70
|
-
placeholder:
|
|
77
|
+
placeholder: H.descriptionPlaceholder,
|
|
71
78
|
value: h.description,
|
|
72
|
-
disabled:
|
|
79
|
+
disabled: z,
|
|
73
80
|
"aria-invalid": j("description") ? !0 : void 0,
|
|
74
81
|
"aria-describedby": j("description") ? A("description") : void 0,
|
|
75
82
|
onChange: (e) => h.onChange({ description: e.target.value })
|
|
@@ -85,7 +92,7 @@ function E({ items: E, glCodeOptions: D, glCodeDisabled: O, glCodeUnavailableMes
|
|
|
85
92
|
className: "ttw:flex ttw:items-center ttw:gap-1",
|
|
86
93
|
children: [/* @__PURE__ */ y(a, {
|
|
87
94
|
htmlFor: `${v}-gl-code`,
|
|
88
|
-
children:
|
|
95
|
+
children: H.glCode
|
|
89
96
|
}), k ? /* @__PURE__ */ y(p, { children: /* @__PURE__ */ b(d, { children: [/* @__PURE__ */ y(m, {
|
|
90
97
|
type: "button",
|
|
91
98
|
className: "ttw:inline-flex ttw:shrink-0 ttw:cursor-help ttw:text-muted-foreground",
|
|
@@ -97,23 +104,23 @@ function E({ items: E, glCodeOptions: D, glCodeDisabled: O, glCodeUnavailableMes
|
|
|
97
104
|
className: "ttw:relative",
|
|
98
105
|
children: [/* @__PURE__ */ b(o, {
|
|
99
106
|
value: h.glCode,
|
|
100
|
-
disabled:
|
|
107
|
+
disabled: z || O,
|
|
101
108
|
onValueChange: (e) => h.onChange({ glCode: e }),
|
|
102
109
|
children: [/* @__PURE__ */ y(l, {
|
|
103
110
|
id: `${v}-gl-code`,
|
|
104
111
|
className: g("ttw:w-full", h.glCode && "ttw:[&>svg:last-child]:hidden!"),
|
|
105
112
|
"aria-invalid": j("glCode") ? !0 : void 0,
|
|
106
|
-
"aria-describedby": [j("glCode") ? A("glCode") : null,
|
|
107
|
-
children: /* @__PURE__ */ y(u, { placeholder:
|
|
113
|
+
"aria-describedby": [j("glCode") ? A("glCode") : null, G].filter(Boolean).join(" ") || void 0,
|
|
114
|
+
children: /* @__PURE__ */ y(u, { placeholder: H.glCodePlaceholder })
|
|
108
115
|
}), /* @__PURE__ */ y(s, { children: D.map((e) => /* @__PURE__ */ y(c, {
|
|
109
116
|
value: e.value,
|
|
110
117
|
children: e.label
|
|
111
118
|
}, e.value)) })]
|
|
112
|
-
}), h.glCode && !(
|
|
119
|
+
}), h.glCode && !(z || O) ? /* @__PURE__ */ y(e, {
|
|
113
120
|
type: "button",
|
|
114
121
|
variant: "ghost",
|
|
115
122
|
size: "icon-sm",
|
|
116
|
-
"aria-label":
|
|
123
|
+
"aria-label": H.glCodeClear,
|
|
117
124
|
className: "ttw:absolute ttw:top-1/2 ttw:right-1 ttw:-translate-y-1/2",
|
|
118
125
|
onPointerDown: (e) => {
|
|
119
126
|
e.preventDefault(), e.stopPropagation();
|
|
@@ -135,7 +142,7 @@ function E({ items: E, glCodeOptions: D, glCodeDisabled: O, glCodeUnavailableMes
|
|
|
135
142
|
children: [
|
|
136
143
|
/* @__PURE__ */ y(a, {
|
|
137
144
|
htmlFor: `${v}-quantity`,
|
|
138
|
-
children:
|
|
145
|
+
children: H.quantity
|
|
139
146
|
}),
|
|
140
147
|
/* @__PURE__ */ b(n, {
|
|
141
148
|
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",
|
|
@@ -145,8 +152,8 @@ function E({ items: E, glCodeOptions: D, glCodeDisabled: O, glCodeUnavailableMes
|
|
|
145
152
|
variant: "ghost",
|
|
146
153
|
size: "icon",
|
|
147
154
|
className: "ttw:h-full ttw:shrink-0 ttw:rounded-r-none",
|
|
148
|
-
disabled:
|
|
149
|
-
"aria-label":
|
|
155
|
+
disabled: z,
|
|
156
|
+
"aria-label": H.decreaseQuantity(_ + 1),
|
|
150
157
|
onClick: () => h.onQuantityStep(-1),
|
|
151
158
|
children: /* @__PURE__ */ y(S, { className: "ttw:size-3.5" })
|
|
152
159
|
}),
|
|
@@ -155,7 +162,7 @@ function E({ items: E, glCodeOptions: D, glCodeDisabled: O, glCodeUnavailableMes
|
|
|
155
162
|
inputMode: "decimal",
|
|
156
163
|
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",
|
|
157
164
|
value: h.quantity,
|
|
158
|
-
disabled:
|
|
165
|
+
disabled: z,
|
|
159
166
|
"aria-invalid": j("quantity") ? !0 : void 0,
|
|
160
167
|
"aria-describedby": j("quantity") ? A("quantity") : void 0,
|
|
161
168
|
onChange: (e) => h.onChange({ quantity: e.target.value })
|
|
@@ -165,8 +172,8 @@ function E({ items: E, glCodeOptions: D, glCodeDisabled: O, glCodeUnavailableMes
|
|
|
165
172
|
variant: "ghost",
|
|
166
173
|
size: "icon",
|
|
167
174
|
className: "ttw:h-full ttw:shrink-0 ttw:rounded-l-none",
|
|
168
|
-
disabled:
|
|
169
|
-
"aria-label":
|
|
175
|
+
disabled: z,
|
|
176
|
+
"aria-label": H.increaseQuantity(_ + 1),
|
|
170
177
|
onClick: () => h.onQuantityStep(1),
|
|
171
178
|
children: /* @__PURE__ */ y(C, { className: "ttw:size-3.5" })
|
|
172
179
|
})
|
|
@@ -180,19 +187,19 @@ function E({ items: E, glCodeOptions: D, glCodeDisabled: O, glCodeUnavailableMes
|
|
|
180
187
|
children: [
|
|
181
188
|
/* @__PURE__ */ y(a, {
|
|
182
189
|
htmlFor: `${v}-price`,
|
|
183
|
-
children:
|
|
190
|
+
children: H.price
|
|
184
191
|
}),
|
|
185
192
|
/* @__PURE__ */ b(n, { children: [/* @__PURE__ */ y(r, {
|
|
186
193
|
align: "inline-start",
|
|
187
194
|
"aria-hidden": !0,
|
|
188
|
-
children:
|
|
195
|
+
children: H.currencySymbol
|
|
189
196
|
}), /* @__PURE__ */ y(i, {
|
|
190
197
|
id: `${v}-price`,
|
|
191
198
|
"data-has-start-addon": !0,
|
|
192
199
|
inputMode: "decimal",
|
|
193
200
|
className: "ttw:text-right ttw:aria-invalid:border-destructive ttw:aria-invalid:ring-destructive/20",
|
|
194
201
|
value: h.price,
|
|
195
|
-
disabled:
|
|
202
|
+
disabled: z,
|
|
196
203
|
"aria-invalid": j("price") ? !0 : void 0,
|
|
197
204
|
"aria-describedby": j("price") ? A("price") : void 0,
|
|
198
205
|
onChange: (e) => h.onChange({ price: e.target.value })
|
|
@@ -205,19 +212,19 @@ function E({ items: E, glCodeOptions: D, glCodeDisabled: O, glCodeUnavailableMes
|
|
|
205
212
|
children: [
|
|
206
213
|
/* @__PURE__ */ y(a, {
|
|
207
214
|
htmlFor: `${v}-amount`,
|
|
208
|
-
children:
|
|
215
|
+
children: H.amount
|
|
209
216
|
}),
|
|
210
217
|
/* @__PURE__ */ b(n, { children: [/* @__PURE__ */ y(r, {
|
|
211
218
|
align: "inline-start",
|
|
212
219
|
"aria-hidden": !0,
|
|
213
|
-
children:
|
|
220
|
+
children: H.currencySymbol
|
|
214
221
|
}), /* @__PURE__ */ y(i, {
|
|
215
222
|
id: `${v}-amount`,
|
|
216
223
|
"data-has-start-addon": !0,
|
|
217
224
|
inputMode: "decimal",
|
|
218
225
|
className: "ttw:text-right ttw:aria-invalid:border-destructive ttw:aria-invalid:ring-destructive/20",
|
|
219
226
|
value: h.amount,
|
|
220
|
-
disabled:
|
|
227
|
+
disabled: z,
|
|
221
228
|
"aria-invalid": j("amount") ? !0 : void 0,
|
|
222
229
|
"aria-describedby": j("amount") ? A("amount") : void 0,
|
|
223
230
|
onChange: (e) => h.onChange({ amount: e.target.value })
|
|
@@ -234,79 +241,94 @@ function E({ items: E, glCodeOptions: D, glCodeDisabled: O, glCodeUnavailableMes
|
|
|
234
241
|
/* @__PURE__ */ y(e, {
|
|
235
242
|
type: "button",
|
|
236
243
|
variant: "link",
|
|
237
|
-
disabled:
|
|
244
|
+
disabled: z,
|
|
238
245
|
className: "ttw:self-start",
|
|
239
246
|
onClick: I,
|
|
240
|
-
children:
|
|
247
|
+
children: H.addLineItem
|
|
241
248
|
}),
|
|
242
249
|
/* @__PURE__ */ b("div", {
|
|
243
250
|
className: "ttw:flex ttw:flex-col ttw:gap-2 ttw:border-t ttw:border-border ttw:pt-3",
|
|
244
251
|
children: [
|
|
245
252
|
/* @__PURE__ */ b("div", {
|
|
246
|
-
className: "ttw:flex ttw:items-
|
|
253
|
+
className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-4",
|
|
247
254
|
children: [/* @__PURE__ */ y(a, {
|
|
248
|
-
htmlFor: `${
|
|
249
|
-
children:
|
|
250
|
-
}), /* @__PURE__ */ b(
|
|
251
|
-
className: "ttw:
|
|
252
|
-
children: [/* @__PURE__ */
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
255
|
+
htmlFor: `${U}-discount`,
|
|
256
|
+
children: H.discount
|
|
257
|
+
}), /* @__PURE__ */ b("div", {
|
|
258
|
+
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
259
|
+
children: [/* @__PURE__ */ b(n, {
|
|
260
|
+
className: "ttw:w-36",
|
|
261
|
+
children: [/* @__PURE__ */ y(r, {
|
|
262
|
+
align: "inline-start",
|
|
263
|
+
"aria-hidden": !0,
|
|
264
|
+
children: H.currencySymbol
|
|
265
|
+
}), /* @__PURE__ */ y(i, {
|
|
266
|
+
id: `${U}-discount`,
|
|
267
|
+
"data-has-start-addon": !0,
|
|
268
|
+
inputMode: "decimal",
|
|
269
|
+
className: "ttw:text-right ttw:aria-invalid:border-destructive ttw:aria-invalid:ring-destructive/20",
|
|
270
|
+
value: A,
|
|
271
|
+
disabled: z,
|
|
272
|
+
"aria-invalid": R?.discount ? !0 : void 0,
|
|
273
|
+
"aria-describedby": R?.discount ? K("discount") : void 0,
|
|
274
|
+
onChange: (e) => j(e.target.value)
|
|
275
|
+
})]
|
|
276
|
+
}), q("discount")]
|
|
265
277
|
})]
|
|
266
278
|
}),
|
|
267
279
|
/* @__PURE__ */ b("div", {
|
|
268
|
-
className: "ttw:flex ttw:items-
|
|
280
|
+
className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-4",
|
|
269
281
|
children: [/* @__PURE__ */ y(a, {
|
|
270
|
-
htmlFor: `${
|
|
271
|
-
children:
|
|
272
|
-
}), /* @__PURE__ */ b(
|
|
273
|
-
className: "ttw:
|
|
274
|
-
children: [/* @__PURE__ */
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
282
|
+
htmlFor: `${U}-tax`,
|
|
283
|
+
children: H.tax
|
|
284
|
+
}), /* @__PURE__ */ b("div", {
|
|
285
|
+
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
286
|
+
children: [/* @__PURE__ */ b(n, {
|
|
287
|
+
className: "ttw:w-36",
|
|
288
|
+
children: [/* @__PURE__ */ y(r, {
|
|
289
|
+
align: "inline-start",
|
|
290
|
+
"aria-hidden": !0,
|
|
291
|
+
children: H.currencySymbol
|
|
292
|
+
}), /* @__PURE__ */ y(i, {
|
|
293
|
+
id: `${U}-tax`,
|
|
294
|
+
"data-has-start-addon": !0,
|
|
295
|
+
inputMode: "decimal",
|
|
296
|
+
className: "ttw:text-right ttw:aria-invalid:border-destructive ttw:aria-invalid:ring-destructive/20",
|
|
297
|
+
value: M,
|
|
298
|
+
disabled: z,
|
|
299
|
+
"aria-invalid": R?.tax ? !0 : void 0,
|
|
300
|
+
"aria-describedby": R?.tax ? K("tax") : void 0,
|
|
301
|
+
onChange: (e) => N(e.target.value)
|
|
302
|
+
})]
|
|
303
|
+
}), q("tax")]
|
|
287
304
|
})]
|
|
288
305
|
}),
|
|
289
306
|
/* @__PURE__ */ b("div", {
|
|
290
|
-
className: "ttw:flex ttw:items-
|
|
307
|
+
className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-4",
|
|
291
308
|
children: [/* @__PURE__ */ y(a, {
|
|
292
|
-
htmlFor: `${
|
|
309
|
+
htmlFor: `${U}-total`,
|
|
293
310
|
className: "ttw:font-semibold",
|
|
294
|
-
children:
|
|
295
|
-
}), /* @__PURE__ */ b(
|
|
296
|
-
className: "ttw:
|
|
297
|
-
children: [/* @__PURE__ */
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
311
|
+
children: H.totalAmount
|
|
312
|
+
}), /* @__PURE__ */ b("div", {
|
|
313
|
+
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
314
|
+
children: [/* @__PURE__ */ b(n, {
|
|
315
|
+
className: "ttw:w-36",
|
|
316
|
+
children: [/* @__PURE__ */ y(r, {
|
|
317
|
+
align: "inline-start",
|
|
318
|
+
"aria-hidden": !0,
|
|
319
|
+
children: H.currencySymbol
|
|
320
|
+
}), /* @__PURE__ */ y(i, {
|
|
321
|
+
id: `${U}-total`,
|
|
322
|
+
"data-has-start-addon": !0,
|
|
323
|
+
inputMode: "decimal",
|
|
324
|
+
className: "ttw:text-right ttw:font-semibold ttw:aria-invalid:border-destructive ttw:aria-invalid:ring-destructive/20",
|
|
325
|
+
value: P,
|
|
326
|
+
disabled: z,
|
|
327
|
+
"aria-invalid": R?.total ? !0 : void 0,
|
|
328
|
+
"aria-describedby": R?.total ? K("total") : void 0,
|
|
329
|
+
onChange: (e) => F(e.target.value)
|
|
330
|
+
})]
|
|
331
|
+
}), q("total")]
|
|
310
332
|
})]
|
|
311
333
|
})
|
|
312
334
|
]
|
|
@@ -1,155 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { InlineErrorAlert as u } from "../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
|
|
3
|
-
import "../../../shared/ui/dist/index.js";
|
|
4
|
-
import { BillDetailBody as d } from "./index26.js";
|
|
5
|
-
import "./index27.js";
|
|
6
|
-
import { BillFormFields as f } from "./index29.js";
|
|
7
|
-
import "./index30.js";
|
|
8
|
-
import { LineItemsSection as p } from "./index32.js";
|
|
9
|
-
import "./index33.js";
|
|
10
|
-
import { VendorSection as m } from "./index41.js";
|
|
11
|
-
import "./index42.js";
|
|
12
|
-
import { mergeBillCreateScreenLabels as h } from "./index43.js";
|
|
13
|
-
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
14
|
-
import { Minimize2 as y, MoreVertical as b, X as x } from "lucide-react";
|
|
1
|
+
import { useEffect as e, useRef as t } from "react";
|
|
15
2
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js
|
|
16
|
-
function
|
|
17
|
-
let
|
|
18
|
-
return
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"data-testid": G,
|
|
25
|
-
children: [
|
|
26
|
-
/* @__PURE__ */ v(i, {
|
|
27
|
-
className: "ttw:flex ttw:flex-row ttw:items-start ttw:justify-between ttw:border-b ttw:border-border ttw:px-6 ttw:py-4",
|
|
28
|
-
children: [/* @__PURE__ */ v("div", {
|
|
29
|
-
className: "ttw:flex ttw:flex-col ttw:gap-0.5",
|
|
30
|
-
children: [
|
|
31
|
-
/* @__PURE__ */ _(a, {
|
|
32
|
-
className: "ttw:text-xl ttw:font-semibold",
|
|
33
|
-
children: w
|
|
34
|
-
}),
|
|
35
|
-
T ? /* @__PURE__ */ _("p", {
|
|
36
|
-
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
37
|
-
children: T
|
|
38
|
-
}) : null,
|
|
39
|
-
/* @__PURE__ */ _(r, {
|
|
40
|
-
className: "ttw:sr-only",
|
|
41
|
-
children: q.hiddenDescription
|
|
42
|
-
})
|
|
43
|
-
]
|
|
44
|
-
}), /* @__PURE__ */ v("div", {
|
|
45
|
-
className: "ttw:flex ttw:items-center ttw:gap-1",
|
|
46
|
-
children: [
|
|
47
|
-
H ? /* @__PURE__ */ _(e, {
|
|
48
|
-
type: "button",
|
|
49
|
-
variant: "ghost",
|
|
50
|
-
size: "icon",
|
|
51
|
-
"aria-label": q.collapseButton,
|
|
52
|
-
disabled: L,
|
|
53
|
-
onClick: H,
|
|
54
|
-
children: /* @__PURE__ */ _(y, { className: "ttw:size-4" })
|
|
55
|
-
}) : null,
|
|
56
|
-
N && N.length > 0 ? /* @__PURE__ */ v(o, { children: [/* @__PURE__ */ _(l, {
|
|
57
|
-
asChild: !0,
|
|
58
|
-
children: /* @__PURE__ */ _(e, {
|
|
59
|
-
type: "button",
|
|
60
|
-
variant: "ghost",
|
|
61
|
-
size: "icon",
|
|
62
|
-
"aria-label": q.menuTrigger,
|
|
63
|
-
disabled: L,
|
|
64
|
-
children: /* @__PURE__ */ _(b, { className: "ttw:size-4" })
|
|
65
|
-
})
|
|
66
|
-
}), /* @__PURE__ */ _(s, {
|
|
67
|
-
align: "end",
|
|
68
|
-
children: N.map((e) => /* @__PURE__ */ _(c, {
|
|
69
|
-
variant: e.destructive ? "destructive" : void 0,
|
|
70
|
-
disabled: e.disabled,
|
|
71
|
-
onSelect: e.onSelect,
|
|
72
|
-
children: e.label
|
|
73
|
-
}, e.id))
|
|
74
|
-
})] }) : null,
|
|
75
|
-
/* @__PURE__ */ _(e, {
|
|
76
|
-
type: "button",
|
|
77
|
-
variant: "ghost",
|
|
78
|
-
size: "icon",
|
|
79
|
-
"aria-label": q.closeButton,
|
|
80
|
-
disabled: L,
|
|
81
|
-
onClick: V,
|
|
82
|
-
children: /* @__PURE__ */ _(x, { className: "ttw:size-4" })
|
|
83
|
-
})
|
|
84
|
-
]
|
|
85
|
-
})]
|
|
86
|
-
}),
|
|
87
|
-
/* @__PURE__ */ v("div", {
|
|
88
|
-
className: "ttw:grid ttw:flex-1 ttw:grid-cols-2 ttw:overflow-hidden",
|
|
89
|
-
children: [/* @__PURE__ */ v("div", {
|
|
90
|
-
className: "ttw:flex ttw:flex-col ttw:gap-6 ttw:overflow-y-auto ttw:px-6 ttw:py-6",
|
|
91
|
-
children: [
|
|
92
|
-
k?.form ? /* @__PURE__ */ _(u, { children: k.form }) : null,
|
|
93
|
-
E ? /* @__PURE__ */ _("div", {
|
|
94
|
-
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
95
|
-
children: E
|
|
96
|
-
}) : null,
|
|
97
|
-
J ? /* @__PURE__ */ _(d, {
|
|
98
|
-
...F,
|
|
99
|
-
labels: q.detailBody
|
|
100
|
-
}) : /* @__PURE__ */ v(g, { children: [
|
|
101
|
-
/* @__PURE__ */ _(m, {
|
|
102
|
-
...D,
|
|
103
|
-
onEdit: P ? void 0 : D.onEdit,
|
|
104
|
-
onClear: P ? void 0 : D.onClear,
|
|
105
|
-
disabled: P,
|
|
106
|
-
labels: q.vendorSection
|
|
107
|
-
}),
|
|
108
|
-
/* @__PURE__ */ _(f, {
|
|
109
|
-
values: O,
|
|
110
|
-
errors: k,
|
|
111
|
-
onChange: A,
|
|
112
|
-
disabled: P,
|
|
113
|
-
labels: q.detailsFields
|
|
114
|
-
}),
|
|
115
|
-
/* @__PURE__ */ _(p, {
|
|
116
|
-
...j,
|
|
117
|
-
disabled: j.disabled || I || P,
|
|
118
|
-
labels: q.lineItems
|
|
119
|
-
})
|
|
120
|
-
] })
|
|
121
|
-
]
|
|
122
|
-
}), /* @__PURE__ */ _("div", {
|
|
123
|
-
className: "ttw:overflow-y-auto ttw:bg-muted/30 ttw:px-6 ttw:py-6",
|
|
124
|
-
children: M
|
|
125
|
-
})]
|
|
126
|
-
}),
|
|
127
|
-
J ? null : /* @__PURE__ */ v("div", {
|
|
128
|
-
className: "ttw:flex ttw:justify-end ttw:gap-2 ttw:border-t ttw:border-border ttw:px-6 ttw:py-4",
|
|
129
|
-
children: [/* @__PURE__ */ _(e, {
|
|
130
|
-
type: "button",
|
|
131
|
-
variant: "ghost",
|
|
132
|
-
disabled: L,
|
|
133
|
-
onClick: V,
|
|
134
|
-
children: P ? q.closeButton : q.cancelButton
|
|
135
|
-
}), P ? null : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(e, {
|
|
136
|
-
type: "button",
|
|
137
|
-
variant: B ? "secondary" : "default",
|
|
138
|
-
onClick: U,
|
|
139
|
-
loading: R,
|
|
140
|
-
disabled: L || z || I || D.mode === "creating",
|
|
141
|
-
children: q.saveDraftButton
|
|
142
|
-
}), B ? /* @__PURE__ */ _(e, {
|
|
143
|
-
type: "button",
|
|
144
|
-
onClick: W,
|
|
145
|
-
loading: z,
|
|
146
|
-
disabled: L || R || I || D.mode === "creating",
|
|
147
|
-
children: q.finalizeButton
|
|
148
|
-
}) : null] })]
|
|
149
|
-
})
|
|
150
|
-
]
|
|
151
|
-
})
|
|
152
|
-
});
|
|
3
|
+
function n(n) {
|
|
4
|
+
let r = t(null), i = t(n);
|
|
5
|
+
return e(() => {
|
|
6
|
+
if (n === i.current) return;
|
|
7
|
+
i.current = n;
|
|
8
|
+
let e = r.current?.querySelector("[aria-invalid=\"true\"], [data-invalid=\"true\"]");
|
|
9
|
+
e?.scrollIntoView({ block: "center" }), e?.focus({ preventScroll: !0 });
|
|
10
|
+
}, [n]), r;
|
|
153
11
|
}
|
|
154
12
|
//#endregion
|
|
155
|
-
export {
|
|
13
|
+
export { n as useFocusFirstInvalidField };
|