@tesouro/embedded-components-react 0.2.264 → 0.2.267
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/README.md +8 -6
- package/dist/experimental/WidgetSuite.d.ts +93 -2
- package/dist/experimental/WidgetSuite.js +5 -5
- package/dist/experimental/index.d.ts +93 -2
- package/dist/experimental/index.js +5 -5
- package/dist/index.css +45 -9
- package/dist/index.d.ts +29 -9
- package/dist/index.js +2 -2
- package/dist/lib/AcceptDisclosuresWidget.d.ts +17 -5
- package/dist/lib/AcceptDisclosuresWidget.js +1 -1
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/lib/WidgetProvider.d.ts +12 -4
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/data-access/dist/index2.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index3.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js +36 -34
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/index.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/{index3.js → lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js} +3 -3
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/{index2.js → lib/AcceptDisclosuresWidget/labels.js} +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +99 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +7 -97
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +99 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +2 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +43 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +1 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +48 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +9 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +8 -91
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +6 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +7 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +100 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +3 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +6 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +9 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +83 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +2 -111
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +8 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +103 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +37 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +15 -116
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +126 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +32 -69
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +0 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +34 -69
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +261 -181
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +32 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index7.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index3.js +4 -15
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index4.js +26 -91
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index5.js +87 -74
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index6.js +142 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/ui/dist/index2.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/ui/dist/index3.js +49 -33
- package/package.json +1 -1
|
@@ -1,205 +1,285 @@
|
|
|
1
|
-
import { Button as e, Input as t,
|
|
2
|
-
import { LINE_ITEMS_SECTION_LABELS_EN as
|
|
3
|
-
import { useId as
|
|
4
|
-
import { jsx as
|
|
5
|
-
import { Minus as
|
|
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
|
|
8
|
-
let
|
|
9
|
-
...
|
|
10
|
-
...
|
|
11
|
-
},
|
|
12
|
-
return /* @__PURE__ */
|
|
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":
|
|
14
|
+
"data-testid": A,
|
|
15
15
|
children: [
|
|
16
|
-
/* @__PURE__ */ d
|
|
16
|
+
/* @__PURE__ */ m(d, {
|
|
17
17
|
component: "h2",
|
|
18
18
|
variant: "h6",
|
|
19
19
|
className: "ttw:font-semibold",
|
|
20
|
-
children:
|
|
20
|
+
children: M.heading
|
|
21
21
|
}),
|
|
22
|
-
/* @__PURE__ */
|
|
22
|
+
/* @__PURE__ */ m("p", {
|
|
23
23
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
24
|
-
children:
|
|
24
|
+
children: M.helpText
|
|
25
25
|
}),
|
|
26
|
-
|
|
27
|
-
let
|
|
28
|
-
let t =
|
|
29
|
-
return t ? /* @__PURE__ */
|
|
30
|
-
id:
|
|
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__ */
|
|
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__ */
|
|
38
|
-
className: "ttw:flex ttw:
|
|
37
|
+
children: /* @__PURE__ */ h("div", {
|
|
38
|
+
className: "ttw:@container/line-item ttw:flex ttw:flex-col ttw:gap-3",
|
|
39
39
|
children: [
|
|
40
|
-
|
|
41
|
-
className: "ttw:
|
|
42
|
-
children: [
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
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
|
-
},
|
|
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__ */
|
|
189
|
-
className: "ttw:flex ttw:
|
|
190
|
-
children: [
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
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 {
|
|
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,
|
|
15
|
-
let
|
|
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
|
-
...
|
|
17
|
+
...R,
|
|
18
18
|
vendorSection: {
|
|
19
19
|
...m.vendorSection,
|
|
20
|
-
...
|
|
20
|
+
...R?.vendorSection,
|
|
21
21
|
summaryCard: {
|
|
22
22
|
...m.vendorSection.summaryCard,
|
|
23
|
-
...
|
|
23
|
+
...R?.vendorSection?.summaryCard
|
|
24
24
|
},
|
|
25
25
|
search: {
|
|
26
26
|
...m.vendorSection.search,
|
|
27
|
-
...
|
|
27
|
+
...R?.vendorSection?.search
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
detailsFields: {
|
|
31
31
|
...m.detailsFields,
|
|
32
|
-
...
|
|
32
|
+
...R?.detailsFields
|
|
33
33
|
},
|
|
34
34
|
lineItems: {
|
|
35
35
|
...m.lineItems,
|
|
36
|
-
...
|
|
36
|
+
...R?.lineItems
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
return /* @__PURE__ */ h(t, {
|
|
40
40
|
open: y,
|
|
41
|
-
onOpenChange: (e) => e ? b(e) :
|
|
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":
|
|
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:
|
|
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: [
|
|
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":
|
|
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:
|
|
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":
|
|
88
|
-
onClick:
|
|
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:
|
|
102
|
+
labels: z.vendorSection
|
|
103
103
|
}),
|
|
104
104
|
/* @__PURE__ */ h(d, {
|
|
105
105
|
values: T,
|
|
106
106
|
errors: E,
|
|
107
107
|
onChange: D,
|
|
108
|
-
|
|
109
|
-
labels: B.detailsFields
|
|
108
|
+
labels: z.detailsFields
|
|
110
109
|
}),
|
|
111
110
|
/* @__PURE__ */ h(f, {
|
|
112
|
-
...
|
|
113
|
-
disabled:
|
|
114
|
-
labels:
|
|
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:
|
|
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:
|
|
129
|
-
children:
|
|
127
|
+
onClick: P,
|
|
128
|
+
children: z.cancelButton
|
|
130
129
|
}),
|
|
131
130
|
/* @__PURE__ */ h(e, {
|
|
132
131
|
type: "button",
|
|
133
132
|
variant: "secondary",
|
|
134
|
-
onClick:
|
|
135
|
-
loading:
|
|
136
|
-
disabled:
|
|
137
|
-
children:
|
|
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:
|
|
142
|
-
loading:
|
|
143
|
-
disabled:
|
|
144
|
-
children:
|
|
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-
|
|
37
|
-
children: [/* @__PURE__ */ a(s, { className: "ttw:size-3.5" })
|
|
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
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.2.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.2.267", n = "ffc9d042b2bcd9bb009f185e224c044803586799", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WIDGET_SUITE_CONTENT_LABELS_EN as e,
|
|
2
|
-
import { WIDGET_SUITE_DEFAULT_SECTIONS as
|
|
3
|
-
import { WIDGET_SUITE_SHELL_LABELS_EN as
|
|
1
|
+
import { WIDGET_SUITE_CONTENT_LABELS_EN as e, WIDGET_SUITE_DISCLOSURE_LABELS_EN as t, WIDGET_SUITE_SECTION_LABELS_EN as n, WIDGET_SUITE_SECTION_TITLE_LABELS_EN as r } from "./index4.js";
|
|
2
|
+
import { WIDGET_SUITE_DEFAULT_SECTIONS as i, WidgetSuiteSectionId as a } from "./index5.js";
|
|
3
|
+
import { WIDGET_SUITE_SHELL_LABELS_EN as o } from "../../ui/dist/index2.js";
|
|
4
4
|
import "../../ui/dist/index.js";
|
|
5
|
-
import { WidgetSuite as
|
|
6
|
-
export { e as WIDGET_SUITE_CONTENT_LABELS_EN,
|
|
5
|
+
import { WidgetSuite as s } from "./index6.js";
|
|
6
|
+
export { e as WIDGET_SUITE_CONTENT_LABELS_EN, i as WIDGET_SUITE_DEFAULT_SECTIONS, t as WIDGET_SUITE_DISCLOSURE_LABELS_EN, n as WIDGET_SUITE_SECTION_LABELS_EN, r as WIDGET_SUITE_SECTION_TITLE_LABELS_EN, o as WIDGET_SUITE_SHELL_LABELS_EN, s as WidgetSuite, a as WidgetSuiteSectionId };
|