@tesouro/embedded-components-react 0.11.253 → 0.11.255
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/index.css +9 -344
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index23.js +35 -38
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index26.js +21 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +3 -105
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index28.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +47 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index34.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index4.js +87 -90
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index44.js +238 -248
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index46.js +15 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index47.js +199 -202
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index5.js +16 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index.js +25 -25
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index10.js +18 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index11.js +150 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index12.js +2 -150
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index13.js +75 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js +272 -70
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js +1 -279
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index16.js +20 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index17.js +51 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index18.js +2 -55
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index19.js +34 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index20.js +369 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index21.js +2 -373
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index22.js +22 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index23.js +124 -20
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index24.js +2 -126
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index25.js +30 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index26.js +51 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index27.js +1 -52
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index28.js +54 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index29.js +10 -54
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index3.js +35 -35
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index30.js +133 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index31.js +1 -198
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index32.js +30 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js +52 -43
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js +2 -315
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index35.js +15 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index36.js +158 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index37.js +2 -162
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index38.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index39.js +19 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index40.js +2 -35
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index41.js +9 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index42.js +31 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index43.js +2 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index44.js +6 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index45.js +27 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index46.js +2 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index47.js +13 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index48.js +100 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index49.js +2 -107
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index5.js +12 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index50.js +9 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index51.js +41 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index52.js +2 -52
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index6.js +1 -22
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index7.js +31 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index8.js +1 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index9.js +34 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index14.js +1 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index19.js +2 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index15.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index17.js +2 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index10.js +119 -104
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index11.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index14.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index2.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index4.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index9.js +9 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index10.js +76 -171
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index11.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index12.js +33 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index13.js +9 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index14.js +126 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index15.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index2.js +23 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index3.js +32 -126
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index4.js +14 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index5.js +3 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index6.js +28 -104
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index7.js +72 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index8.js +2 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index9.js +12 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +6 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +6 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +32 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index2.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index3.js +15 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index4.js +53 -84
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/index.js +17 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/billDetailLabels.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index3.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index4.js +13 -14
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/document/documentPreview.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +20 -19
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/MaskedAccountNumber/MaskedAccountNumber.js +30 -34
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/TooltipIconButton/TooltipIconButton.js +55 -0
- package/dist/packages/shared-ui-shadcn/dist/index.js +1322 -1312
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index53.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +0 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +0 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/maskAccountNumber.js +0 -5
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index21.js
CHANGED
|
@@ -1,373 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { useId as y } from "react";
|
|
4
|
-
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
5
|
-
import { CircleAlert as S, Minus as C, Plus as w, Trash2 as T, X as E } from "lucide-react";
|
|
6
|
-
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index21.js
|
|
7
|
-
var D = {
|
|
8
|
-
description: t.Required,
|
|
9
|
-
glCode: t.Optional,
|
|
10
|
-
quantity: t.Required,
|
|
11
|
-
price: t.Required,
|
|
12
|
-
amount: t.Required
|
|
13
|
-
}, O = {
|
|
14
|
-
discount: t.Optional,
|
|
15
|
-
tax: t.Optional,
|
|
16
|
-
total: t.Required
|
|
17
|
-
};
|
|
18
|
-
function k({ items: t, glCodeOptions: k, glCodeDisabled: A, glCodeUnavailableMessage: j, discount: M, onDiscountChange: N, onDiscountBlur: P, tax: F, onTaxChange: I, onTaxBlur: L, total: R, onTotalChange: z, onTotalBlur: B, onAddLineItem: V, errors: H, totalsErrors: U, disabled: W, testId: G, labels: K }) {
|
|
19
|
-
let q = v(K), J = y(), Y = t.length > 1, X = j ? `${J}-gl-code-unavailable` : void 0, Z = (e) => `${J}-${e}-error`, Q = (e) => {
|
|
20
|
-
let t = U?.[e];
|
|
21
|
-
return t ? /* @__PURE__ */ b("p", {
|
|
22
|
-
id: Z(e),
|
|
23
|
-
className: "ttw:text-sm ttw:text-destructive ttw:text-right",
|
|
24
|
-
children: t
|
|
25
|
-
}) : null;
|
|
26
|
-
};
|
|
27
|
-
return /* @__PURE__ */ x("section", {
|
|
28
|
-
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
29
|
-
"data-testid": G,
|
|
30
|
-
children: [
|
|
31
|
-
/* @__PURE__ */ b(g, {
|
|
32
|
-
component: "h2",
|
|
33
|
-
variant: "h6",
|
|
34
|
-
className: "ttw:font-semibold",
|
|
35
|
-
children: q.heading
|
|
36
|
-
}),
|
|
37
|
-
/* @__PURE__ */ b("p", {
|
|
38
|
-
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
39
|
-
children: q.helpText
|
|
40
|
-
}),
|
|
41
|
-
j ? /* @__PURE__ */ b("span", {
|
|
42
|
-
id: X,
|
|
43
|
-
className: "ttw:sr-only",
|
|
44
|
-
children: j
|
|
45
|
-
}) : null,
|
|
46
|
-
t.map((t, g) => {
|
|
47
|
-
let v = `${J}-${t.id}`, y = H?.[t.id], O = (e) => `${v}-${e}-error`, M = (e) => y?.[e], N = (e) => {
|
|
48
|
-
let t = M(e);
|
|
49
|
-
return t ? /* @__PURE__ */ b("p", {
|
|
50
|
-
id: O(e),
|
|
51
|
-
className: "ttw:text-sm ttw:text-destructive",
|
|
52
|
-
children: t
|
|
53
|
-
}) : null;
|
|
54
|
-
};
|
|
55
|
-
return /* @__PURE__ */ b("div", {
|
|
56
|
-
className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-muted/30 ttw:p-4",
|
|
57
|
-
children: /* @__PURE__ */ x("div", {
|
|
58
|
-
className: "ttw:@container/line-item ttw:flex ttw:flex-col ttw:gap-3",
|
|
59
|
-
children: [
|
|
60
|
-
/* @__PURE__ */ x("div", {
|
|
61
|
-
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-2",
|
|
62
|
-
children: [/* @__PURE__ */ x("div", {
|
|
63
|
-
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
64
|
-
children: [Y ? /* @__PURE__ */ x("span", {
|
|
65
|
-
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
66
|
-
children: [g + 1, "."]
|
|
67
|
-
}) : null, /* @__PURE__ */ b(o, {
|
|
68
|
-
htmlFor: `${v}-description`,
|
|
69
|
-
requirement: D.description,
|
|
70
|
-
labels: q.fieldMarkers,
|
|
71
|
-
children: q.description
|
|
72
|
-
})]
|
|
73
|
-
}), Y ? /* @__PURE__ */ b(e, {
|
|
74
|
-
type: "button",
|
|
75
|
-
variant: "ghost",
|
|
76
|
-
size: "icon",
|
|
77
|
-
disabled: W,
|
|
78
|
-
"aria-label": q.removeLineItem(g + 1),
|
|
79
|
-
onClick: t.onRemove,
|
|
80
|
-
children: /* @__PURE__ */ b(T, { className: "ttw:size-4" })
|
|
81
|
-
}) : null]
|
|
82
|
-
}),
|
|
83
|
-
/* @__PURE__ */ x("div", {
|
|
84
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
85
|
-
children: [/* @__PURE__ */ b(n, {
|
|
86
|
-
id: `${v}-description`,
|
|
87
|
-
placeholder: q.descriptionPlaceholder,
|
|
88
|
-
value: t.description,
|
|
89
|
-
disabled: W,
|
|
90
|
-
"aria-required": !0,
|
|
91
|
-
"aria-invalid": M("description") ? !0 : void 0,
|
|
92
|
-
"aria-describedby": M("description") ? O("description") : void 0,
|
|
93
|
-
onChange: (e) => t.onChange({ description: e.target.value })
|
|
94
|
-
}), N("description")]
|
|
95
|
-
}),
|
|
96
|
-
/* @__PURE__ */ x("div", {
|
|
97
|
-
className: "ttw:grid ttw:grid-cols-1 ttw:@sm/line-item:grid-cols-3 ttw:@4xl/line-item:grid-cols-12 ttw:gap-3",
|
|
98
|
-
children: [
|
|
99
|
-
/* @__PURE__ */ x("div", {
|
|
100
|
-
className: "ttw:col-span-1 ttw:@sm/line-item:col-span-3 ttw:@4xl/line-item:col-span-5 ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
101
|
-
children: [
|
|
102
|
-
/* @__PURE__ */ x("div", {
|
|
103
|
-
className: "ttw:flex ttw:items-center ttw:gap-1",
|
|
104
|
-
children: [/* @__PURE__ */ b(o, {
|
|
105
|
-
htmlFor: `${v}-gl-code`,
|
|
106
|
-
requirement: D.glCode,
|
|
107
|
-
labels: q.fieldMarkers,
|
|
108
|
-
children: q.glCode
|
|
109
|
-
}), j ? /* @__PURE__ */ b(m, { children: /* @__PURE__ */ x(f, { children: [/* @__PURE__ */ b(h, {
|
|
110
|
-
type: "button",
|
|
111
|
-
className: "ttw:inline-flex ttw:shrink-0 ttw:cursor-help ttw:text-muted-foreground",
|
|
112
|
-
"aria-label": j,
|
|
113
|
-
children: /* @__PURE__ */ b(S, { className: "ttw:size-3.5" })
|
|
114
|
-
}), /* @__PURE__ */ b(p, { children: j })] }) }) : null]
|
|
115
|
-
}),
|
|
116
|
-
/* @__PURE__ */ x("div", {
|
|
117
|
-
className: "ttw:relative",
|
|
118
|
-
children: [/* @__PURE__ */ x(s, {
|
|
119
|
-
value: t.glCode,
|
|
120
|
-
disabled: W || A,
|
|
121
|
-
onValueChange: (e) => t.onChange({ glCode: e }),
|
|
122
|
-
children: [/* @__PURE__ */ b(u, {
|
|
123
|
-
id: `${v}-gl-code`,
|
|
124
|
-
className: _("ttw:w-full", t.glCode && "ttw:[&>svg:last-child]:hidden!"),
|
|
125
|
-
"aria-invalid": M("glCode") ? !0 : void 0,
|
|
126
|
-
"aria-describedby": [M("glCode") ? O("glCode") : null, X].filter(Boolean).join(" ") || void 0,
|
|
127
|
-
children: /* @__PURE__ */ b(d, { placeholder: q.glCodePlaceholder })
|
|
128
|
-
}), /* @__PURE__ */ b(c, { children: k.map((e) => /* @__PURE__ */ b(l, {
|
|
129
|
-
value: e.value,
|
|
130
|
-
children: e.label
|
|
131
|
-
}, e.value)) })]
|
|
132
|
-
}), t.glCode && !(W || A) ? /* @__PURE__ */ b(e, {
|
|
133
|
-
type: "button",
|
|
134
|
-
variant: "ghost",
|
|
135
|
-
size: "icon-sm",
|
|
136
|
-
"aria-label": q.glCodeClear,
|
|
137
|
-
className: "ttw:absolute ttw:top-1/2 ttw:right-1 ttw:-translate-y-1/2",
|
|
138
|
-
onPointerDown: (e) => {
|
|
139
|
-
e.preventDefault(), e.stopPropagation();
|
|
140
|
-
},
|
|
141
|
-
onClick: (e) => {
|
|
142
|
-
e.preventDefault(), e.stopPropagation(), t.onChange({ glCode: "" });
|
|
143
|
-
},
|
|
144
|
-
children: /* @__PURE__ */ b(E, {
|
|
145
|
-
className: "ttw:size-4",
|
|
146
|
-
"aria-hidden": !0
|
|
147
|
-
})
|
|
148
|
-
}) : null]
|
|
149
|
-
}),
|
|
150
|
-
N("glCode")
|
|
151
|
-
]
|
|
152
|
-
}),
|
|
153
|
-
/* @__PURE__ */ x("div", {
|
|
154
|
-
className: "ttw:col-span-1 ttw:@4xl/line-item:col-span-3 ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
155
|
-
children: [
|
|
156
|
-
/* @__PURE__ */ b(o, {
|
|
157
|
-
htmlFor: `${v}-quantity`,
|
|
158
|
-
requirement: D.quantity,
|
|
159
|
-
labels: q.fieldMarkers,
|
|
160
|
-
children: q.quantity
|
|
161
|
-
}),
|
|
162
|
-
/* @__PURE__ */ x(r, {
|
|
163
|
-
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",
|
|
164
|
-
children: [
|
|
165
|
-
/* @__PURE__ */ b(e, {
|
|
166
|
-
type: "button",
|
|
167
|
-
variant: "ghost",
|
|
168
|
-
size: "icon",
|
|
169
|
-
className: "ttw:h-full ttw:shrink-0 ttw:rounded-r-none",
|
|
170
|
-
disabled: W,
|
|
171
|
-
"aria-label": q.decreaseQuantity(g + 1),
|
|
172
|
-
onClick: () => t.onQuantityStep(-1),
|
|
173
|
-
children: /* @__PURE__ */ b(C, { className: "ttw:size-3.5" })
|
|
174
|
-
}),
|
|
175
|
-
/* @__PURE__ */ b(a, {
|
|
176
|
-
id: `${v}-quantity`,
|
|
177
|
-
inputMode: "decimal",
|
|
178
|
-
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",
|
|
179
|
-
value: t.quantity,
|
|
180
|
-
disabled: W,
|
|
181
|
-
"aria-required": !0,
|
|
182
|
-
"aria-invalid": M("quantity") ? !0 : void 0,
|
|
183
|
-
"aria-describedby": M("quantity") ? O("quantity") : void 0,
|
|
184
|
-
onChange: (e) => t.onChange({ quantity: e.target.value })
|
|
185
|
-
}),
|
|
186
|
-
/* @__PURE__ */ b(e, {
|
|
187
|
-
type: "button",
|
|
188
|
-
variant: "ghost",
|
|
189
|
-
size: "icon",
|
|
190
|
-
className: "ttw:h-full ttw:shrink-0 ttw:rounded-l-none",
|
|
191
|
-
disabled: W,
|
|
192
|
-
"aria-label": q.increaseQuantity(g + 1),
|
|
193
|
-
onClick: () => t.onQuantityStep(1),
|
|
194
|
-
children: /* @__PURE__ */ b(w, { className: "ttw:size-3.5" })
|
|
195
|
-
})
|
|
196
|
-
]
|
|
197
|
-
}),
|
|
198
|
-
N("quantity")
|
|
199
|
-
]
|
|
200
|
-
}),
|
|
201
|
-
/* @__PURE__ */ x("div", {
|
|
202
|
-
className: "ttw:col-span-1 ttw:@4xl/line-item:col-span-2 ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
203
|
-
children: [
|
|
204
|
-
/* @__PURE__ */ b(o, {
|
|
205
|
-
htmlFor: `${v}-price`,
|
|
206
|
-
requirement: D.price,
|
|
207
|
-
labels: q.fieldMarkers,
|
|
208
|
-
children: q.price
|
|
209
|
-
}),
|
|
210
|
-
/* @__PURE__ */ x(r, { children: [/* @__PURE__ */ b(i, {
|
|
211
|
-
align: "inline-start",
|
|
212
|
-
"aria-hidden": !0,
|
|
213
|
-
children: q.currencySymbol
|
|
214
|
-
}), /* @__PURE__ */ b(a, {
|
|
215
|
-
id: `${v}-price`,
|
|
216
|
-
"data-has-start-addon": !0,
|
|
217
|
-
inputMode: "decimal",
|
|
218
|
-
className: "ttw:text-right ttw:aria-invalid:border-destructive ttw:aria-invalid:ring-destructive/20",
|
|
219
|
-
value: t.price,
|
|
220
|
-
disabled: W,
|
|
221
|
-
"aria-required": !0,
|
|
222
|
-
"aria-invalid": M("price") ? !0 : void 0,
|
|
223
|
-
"aria-describedby": M("price") ? O("price") : void 0,
|
|
224
|
-
onChange: (e) => t.onChange({ price: e.target.value }),
|
|
225
|
-
onBlur: () => t.onBlur?.("price")
|
|
226
|
-
})] }),
|
|
227
|
-
N("price")
|
|
228
|
-
]
|
|
229
|
-
}),
|
|
230
|
-
/* @__PURE__ */ x("div", {
|
|
231
|
-
className: "ttw:col-span-1 ttw:@4xl/line-item:col-span-2 ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
232
|
-
children: [
|
|
233
|
-
/* @__PURE__ */ b(o, {
|
|
234
|
-
htmlFor: `${v}-amount`,
|
|
235
|
-
requirement: D.amount,
|
|
236
|
-
labels: q.fieldMarkers,
|
|
237
|
-
children: q.amount
|
|
238
|
-
}),
|
|
239
|
-
/* @__PURE__ */ x(r, { children: [/* @__PURE__ */ b(i, {
|
|
240
|
-
align: "inline-start",
|
|
241
|
-
"aria-hidden": !0,
|
|
242
|
-
children: q.currencySymbol
|
|
243
|
-
}), /* @__PURE__ */ b(a, {
|
|
244
|
-
id: `${v}-amount`,
|
|
245
|
-
"data-has-start-addon": !0,
|
|
246
|
-
inputMode: "decimal",
|
|
247
|
-
className: "ttw:text-right ttw:aria-invalid:border-destructive ttw:aria-invalid:ring-destructive/20",
|
|
248
|
-
value: t.amount,
|
|
249
|
-
disabled: W,
|
|
250
|
-
"aria-required": !0,
|
|
251
|
-
"aria-invalid": M("amount") ? !0 : void 0,
|
|
252
|
-
"aria-describedby": M("amount") ? O("amount") : void 0,
|
|
253
|
-
onChange: (e) => t.onChange({ amount: e.target.value }),
|
|
254
|
-
onBlur: () => t.onBlur?.("amount")
|
|
255
|
-
})] }),
|
|
256
|
-
N("amount")
|
|
257
|
-
]
|
|
258
|
-
})
|
|
259
|
-
]
|
|
260
|
-
})
|
|
261
|
-
]
|
|
262
|
-
})
|
|
263
|
-
}, t.id);
|
|
264
|
-
}),
|
|
265
|
-
/* @__PURE__ */ b(e, {
|
|
266
|
-
type: "button",
|
|
267
|
-
variant: "link",
|
|
268
|
-
disabled: W,
|
|
269
|
-
className: "ttw:self-start",
|
|
270
|
-
onClick: V,
|
|
271
|
-
children: q.addLineItem
|
|
272
|
-
}),
|
|
273
|
-
/* @__PURE__ */ x("div", {
|
|
274
|
-
className: "ttw:flex ttw:flex-col ttw:gap-2 ttw:border-t ttw:border-border ttw:pt-3",
|
|
275
|
-
children: [
|
|
276
|
-
/* @__PURE__ */ x("div", {
|
|
277
|
-
className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-4",
|
|
278
|
-
children: [/* @__PURE__ */ b(o, {
|
|
279
|
-
htmlFor: `${J}-discount`,
|
|
280
|
-
requirement: O.discount,
|
|
281
|
-
labels: q.fieldMarkers,
|
|
282
|
-
children: q.discount
|
|
283
|
-
}), /* @__PURE__ */ x("div", {
|
|
284
|
-
className: "ttw:flex ttw:flex-col ttw:items-end ttw:gap-1.5",
|
|
285
|
-
children: [/* @__PURE__ */ x(r, {
|
|
286
|
-
className: "ttw:w-36",
|
|
287
|
-
children: [/* @__PURE__ */ b(i, {
|
|
288
|
-
align: "inline-start",
|
|
289
|
-
"aria-hidden": !0,
|
|
290
|
-
children: q.currencySymbol
|
|
291
|
-
}), /* @__PURE__ */ b(a, {
|
|
292
|
-
id: `${J}-discount`,
|
|
293
|
-
"data-has-start-addon": !0,
|
|
294
|
-
inputMode: "decimal",
|
|
295
|
-
className: "ttw:text-right ttw:aria-invalid:border-destructive ttw:aria-invalid:ring-destructive/20",
|
|
296
|
-
value: M,
|
|
297
|
-
disabled: W,
|
|
298
|
-
"aria-invalid": U?.discount ? !0 : void 0,
|
|
299
|
-
"aria-describedby": U?.discount ? Z("discount") : void 0,
|
|
300
|
-
onChange: (e) => N(e.target.value),
|
|
301
|
-
onBlur: P
|
|
302
|
-
})]
|
|
303
|
-
}), Q("discount")]
|
|
304
|
-
})]
|
|
305
|
-
}),
|
|
306
|
-
/* @__PURE__ */ x("div", {
|
|
307
|
-
className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-4",
|
|
308
|
-
children: [/* @__PURE__ */ b(o, {
|
|
309
|
-
htmlFor: `${J}-tax`,
|
|
310
|
-
requirement: O.tax,
|
|
311
|
-
labels: q.fieldMarkers,
|
|
312
|
-
children: q.tax
|
|
313
|
-
}), /* @__PURE__ */ x("div", {
|
|
314
|
-
className: "ttw:flex ttw:flex-col ttw:items-end ttw:gap-1.5",
|
|
315
|
-
children: [/* @__PURE__ */ x(r, {
|
|
316
|
-
className: "ttw:w-36",
|
|
317
|
-
children: [/* @__PURE__ */ b(i, {
|
|
318
|
-
align: "inline-start",
|
|
319
|
-
"aria-hidden": !0,
|
|
320
|
-
children: q.currencySymbol
|
|
321
|
-
}), /* @__PURE__ */ b(a, {
|
|
322
|
-
id: `${J}-tax`,
|
|
323
|
-
"data-has-start-addon": !0,
|
|
324
|
-
inputMode: "decimal",
|
|
325
|
-
className: "ttw:text-right ttw:aria-invalid:border-destructive ttw:aria-invalid:ring-destructive/20",
|
|
326
|
-
value: F,
|
|
327
|
-
disabled: W,
|
|
328
|
-
"aria-invalid": U?.tax ? !0 : void 0,
|
|
329
|
-
"aria-describedby": U?.tax ? Z("tax") : void 0,
|
|
330
|
-
onChange: (e) => I(e.target.value),
|
|
331
|
-
onBlur: L
|
|
332
|
-
})]
|
|
333
|
-
}), Q("tax")]
|
|
334
|
-
})]
|
|
335
|
-
}),
|
|
336
|
-
/* @__PURE__ */ x("div", {
|
|
337
|
-
className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-4",
|
|
338
|
-
children: [/* @__PURE__ */ b(o, {
|
|
339
|
-
htmlFor: `${J}-total`,
|
|
340
|
-
className: "ttw:font-semibold",
|
|
341
|
-
requirement: O.total,
|
|
342
|
-
labels: q.fieldMarkers,
|
|
343
|
-
children: q.totalAmount
|
|
344
|
-
}), /* @__PURE__ */ x("div", {
|
|
345
|
-
className: "ttw:flex ttw:flex-col ttw:items-end ttw:gap-1.5",
|
|
346
|
-
children: [/* @__PURE__ */ x(r, {
|
|
347
|
-
className: "ttw:w-36",
|
|
348
|
-
children: [/* @__PURE__ */ b(i, {
|
|
349
|
-
align: "inline-start",
|
|
350
|
-
"aria-hidden": !0,
|
|
351
|
-
children: q.currencySymbol
|
|
352
|
-
}), /* @__PURE__ */ b(a, {
|
|
353
|
-
id: `${J}-total`,
|
|
354
|
-
"data-has-start-addon": !0,
|
|
355
|
-
inputMode: "decimal",
|
|
356
|
-
className: "ttw:text-right ttw:font-semibold ttw:aria-invalid:border-destructive ttw:aria-invalid:ring-destructive/20",
|
|
357
|
-
value: R,
|
|
358
|
-
disabled: W,
|
|
359
|
-
"aria-required": !0,
|
|
360
|
-
"aria-invalid": U?.total ? !0 : void 0,
|
|
361
|
-
"aria-describedby": U?.total ? Z("total") : void 0,
|
|
362
|
-
onChange: (e) => z(e.target.value),
|
|
363
|
-
onBlur: B
|
|
364
|
-
})]
|
|
365
|
-
}), Q("total")]
|
|
366
|
-
})]
|
|
367
|
-
})
|
|
368
|
-
]
|
|
369
|
-
})
|
|
370
|
-
]
|
|
371
|
-
});
|
|
372
|
-
}
|
|
373
|
-
export { k as LineItemsSection, k as default };
|
|
1
|
+
import "./index19.js";
|
|
2
|
+
import "./index20.js";
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index22.js
CHANGED
|
@@ -1,2 +1,22 @@
|
|
|
1
|
-
import "
|
|
2
|
-
|
|
1
|
+
import { LABEL_LABELS_EN as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index22.js
|
|
3
|
+
var t = {
|
|
4
|
+
fieldLabel: "Select or add vendor",
|
|
5
|
+
triggerPlaceholder: "Select vendor",
|
|
6
|
+
placeholder: "Search",
|
|
7
|
+
loading: "Searching vendors...",
|
|
8
|
+
emptyResults: "No vendors found",
|
|
9
|
+
addVendorAction: "Add vendor",
|
|
10
|
+
fieldMarkers: e
|
|
11
|
+
};
|
|
12
|
+
function n(e) {
|
|
13
|
+
return {
|
|
14
|
+
...t,
|
|
15
|
+
...e,
|
|
16
|
+
fieldMarkers: {
|
|
17
|
+
...t.fieldMarkers,
|
|
18
|
+
...e?.fieldMarkers
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export { t as VENDOR_SEARCH_COMBOBOX_LABELS_EN, n as mergeVendorSearchComboboxLabels };
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index23.js
CHANGED
|
@@ -1,22 +1,126 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Badge as e, Command as t, CommandGroup as n, CommandInput as r, CommandItem as i, CommandList as a, CommandSeparator as o, FieldDescription as s, FieldRequirement as c, Label as l, Popover as u, PopoverContent as d, PopoverTrigger as f, Skeleton as p, cn as m } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { mergeVendorSearchComboboxLabels as h } from "./index22.js";
|
|
3
|
+
import { useId as g, useState as _ } from "react";
|
|
4
|
+
import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
5
|
+
import { ChevronDown as x, Plus as S } from "lucide-react";
|
|
2
6
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index23.js
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
var C = 5, w = "ttw:min-h-44";
|
|
8
|
+
function T({ query: T, onQueryChange: E, results: D, isLoading: O, onAddVendor: k, selectedLabel: A, badge: j, helperText: M, resultsHeading: N, addVendorDescription: P, testId: F, labels: I }) {
|
|
9
|
+
let L = h(I), R = g(), z = g(), [B, V] = _(!1);
|
|
10
|
+
return /* @__PURE__ */ b("div", {
|
|
11
|
+
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
12
|
+
"data-testid": F,
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ y(l, {
|
|
15
|
+
htmlFor: R,
|
|
16
|
+
requirement: c.Required,
|
|
17
|
+
labels: L.fieldMarkers,
|
|
18
|
+
children: L.fieldLabel
|
|
19
|
+
}),
|
|
20
|
+
/* @__PURE__ */ b(u, {
|
|
21
|
+
modal: !0,
|
|
22
|
+
open: B,
|
|
23
|
+
onOpenChange: V,
|
|
24
|
+
children: [/* @__PURE__ */ y(f, {
|
|
25
|
+
asChild: !0,
|
|
26
|
+
children: /* @__PURE__ */ b("button", {
|
|
27
|
+
type: "button",
|
|
28
|
+
id: R,
|
|
29
|
+
role: "combobox",
|
|
30
|
+
"aria-expanded": B,
|
|
31
|
+
"aria-controls": B ? `${R}-options` : void 0,
|
|
32
|
+
"aria-required": !0,
|
|
33
|
+
"aria-describedby": M ? z : void 0,
|
|
34
|
+
className: "ttw:flex ttw:h-10 ttw:w-full ttw:items-center ttw:justify-between 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",
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ y("span", {
|
|
37
|
+
className: m("ttw:min-w-0 ttw:flex-1 ttw:truncate", A ? "ttw:text-foreground" : "ttw:text-muted-foreground"),
|
|
38
|
+
children: A || L.triggerPlaceholder
|
|
39
|
+
}),
|
|
40
|
+
j ? /* @__PURE__ */ y(e, {
|
|
41
|
+
variant: "secondary",
|
|
42
|
+
children: j
|
|
43
|
+
}) : null,
|
|
44
|
+
/* @__PURE__ */ y(x, {
|
|
45
|
+
"aria-hidden": !0,
|
|
46
|
+
className: "ttw:size-4 ttw:shrink-0 ttw:opacity-50"
|
|
47
|
+
})
|
|
48
|
+
]
|
|
49
|
+
})
|
|
50
|
+
}), /* @__PURE__ */ y(d, {
|
|
51
|
+
id: `${R}-options`,
|
|
52
|
+
align: "start",
|
|
53
|
+
className: "ttw:w-[var(--radix-popover-trigger-width)] ttw:p-0",
|
|
54
|
+
children: /* @__PURE__ */ b(t, {
|
|
55
|
+
shouldFilter: !1,
|
|
56
|
+
children: [/* @__PURE__ */ y(r, {
|
|
57
|
+
value: T,
|
|
58
|
+
onValueChange: E,
|
|
59
|
+
placeholder: L.placeholder,
|
|
60
|
+
"aria-label": L.placeholder
|
|
61
|
+
}), /* @__PURE__ */ b(a, {
|
|
62
|
+
className: m("ttw:max-h-72", w),
|
|
63
|
+
children: [O ? /* @__PURE__ */ b("div", {
|
|
64
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2 ttw:p-2",
|
|
65
|
+
"aria-busy": "true",
|
|
66
|
+
children: [/* @__PURE__ */ y("span", {
|
|
67
|
+
className: "ttw:sr-only",
|
|
68
|
+
children: L.loading
|
|
69
|
+
}), Array.from({ length: C }).map((e, t) => /* @__PURE__ */ b("div", {
|
|
70
|
+
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4 ttw:px-2 ttw:py-1.5",
|
|
71
|
+
children: [/* @__PURE__ */ y(p, {
|
|
72
|
+
height: 14,
|
|
73
|
+
width: "55%"
|
|
74
|
+
}), /* @__PURE__ */ y(p, {
|
|
75
|
+
height: 14,
|
|
76
|
+
width: "30%"
|
|
77
|
+
})]
|
|
78
|
+
}, t))]
|
|
79
|
+
}) : D.length === 0 ? /* @__PURE__ */ y("div", {
|
|
80
|
+
className: m("ttw:flex ttw:items-center ttw:justify-center ttw:py-6 ttw:text-center ttw:text-sm", w),
|
|
81
|
+
children: L.emptyResults
|
|
82
|
+
}) : /* @__PURE__ */ y(n, {
|
|
83
|
+
heading: N,
|
|
84
|
+
children: D.map((e, t) => /* @__PURE__ */ y(i, {
|
|
85
|
+
value: `${e.name} ${e.email} ${t}`,
|
|
86
|
+
onSelect: () => e.onSelect(),
|
|
87
|
+
children: /* @__PURE__ */ b("div", {
|
|
88
|
+
className: "ttw:flex ttw:min-w-0 ttw:flex-col",
|
|
89
|
+
children: [/* @__PURE__ */ y("span", {
|
|
90
|
+
className: "ttw:truncate ttw:text-foreground",
|
|
91
|
+
children: e.name
|
|
92
|
+
}), e.email ? /* @__PURE__ */ y("span", {
|
|
93
|
+
className: "ttw:truncate ttw:text-xs ttw:text-muted-foreground",
|
|
94
|
+
children: e.email
|
|
95
|
+
}) : null]
|
|
96
|
+
})
|
|
97
|
+
}, `${e.name}:${e.email}:${t}`))
|
|
98
|
+
}), k ? /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(o, {}), /* @__PURE__ */ b(i, {
|
|
99
|
+
value: "__add_vendor__",
|
|
100
|
+
onSelect: () => {
|
|
101
|
+
V(!1), k();
|
|
102
|
+
},
|
|
103
|
+
className: "ttw:sticky ttw:bottom-0 ttw:bg-popover ttw:text-primary",
|
|
104
|
+
children: [/* @__PURE__ */ y(S, { className: "ttw:size-4 ttw:text-primary" }), /* @__PURE__ */ b("div", {
|
|
105
|
+
className: "ttw:flex ttw:min-w-0 ttw:flex-col",
|
|
106
|
+
children: [/* @__PURE__ */ y("span", {
|
|
107
|
+
className: "ttw:truncate",
|
|
108
|
+
children: L.addVendorAction
|
|
109
|
+
}), P ? /* @__PURE__ */ y("span", {
|
|
110
|
+
className: "ttw:truncate ttw:text-xs ttw:text-muted-foreground",
|
|
111
|
+
children: P
|
|
112
|
+
}) : null]
|
|
113
|
+
})]
|
|
114
|
+
})] }) : null]
|
|
115
|
+
})]
|
|
116
|
+
})
|
|
117
|
+
})]
|
|
118
|
+
}),
|
|
119
|
+
M ? /* @__PURE__ */ y(s, {
|
|
120
|
+
id: z,
|
|
121
|
+
children: M
|
|
122
|
+
}) : null
|
|
123
|
+
]
|
|
124
|
+
});
|
|
21
125
|
}
|
|
22
|
-
export {
|
|
126
|
+
export { T as VendorSearchCombobox, T as default };
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index24.js
CHANGED
|
@@ -1,126 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { useId as g, useState as _ } from "react";
|
|
4
|
-
import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
5
|
-
import { ChevronDown as x, Plus as S } from "lucide-react";
|
|
6
|
-
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index24.js
|
|
7
|
-
var C = 5, w = "ttw:min-h-44";
|
|
8
|
-
function T({ query: T, onQueryChange: E, results: D, isLoading: O, onAddVendor: k, selectedLabel: A, badge: j, helperText: M, resultsHeading: N, addVendorDescription: P, testId: F, labels: I }) {
|
|
9
|
-
let L = h(I), R = g(), z = g(), [B, V] = _(!1);
|
|
10
|
-
return /* @__PURE__ */ b("div", {
|
|
11
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
12
|
-
"data-testid": F,
|
|
13
|
-
children: [
|
|
14
|
-
/* @__PURE__ */ y(l, {
|
|
15
|
-
htmlFor: R,
|
|
16
|
-
requirement: c.Required,
|
|
17
|
-
labels: L.fieldMarkers,
|
|
18
|
-
children: L.fieldLabel
|
|
19
|
-
}),
|
|
20
|
-
/* @__PURE__ */ b(u, {
|
|
21
|
-
modal: !0,
|
|
22
|
-
open: B,
|
|
23
|
-
onOpenChange: V,
|
|
24
|
-
children: [/* @__PURE__ */ y(f, {
|
|
25
|
-
asChild: !0,
|
|
26
|
-
children: /* @__PURE__ */ b("button", {
|
|
27
|
-
type: "button",
|
|
28
|
-
id: R,
|
|
29
|
-
role: "combobox",
|
|
30
|
-
"aria-expanded": B,
|
|
31
|
-
"aria-controls": B ? `${R}-options` : void 0,
|
|
32
|
-
"aria-required": !0,
|
|
33
|
-
"aria-describedby": M ? z : void 0,
|
|
34
|
-
className: "ttw:flex ttw:h-10 ttw:w-full ttw:items-center ttw:justify-between 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",
|
|
35
|
-
children: [
|
|
36
|
-
/* @__PURE__ */ y("span", {
|
|
37
|
-
className: m("ttw:min-w-0 ttw:flex-1 ttw:truncate", A ? "ttw:text-foreground" : "ttw:text-muted-foreground"),
|
|
38
|
-
children: A || L.triggerPlaceholder
|
|
39
|
-
}),
|
|
40
|
-
j ? /* @__PURE__ */ y(e, {
|
|
41
|
-
variant: "secondary",
|
|
42
|
-
children: j
|
|
43
|
-
}) : null,
|
|
44
|
-
/* @__PURE__ */ y(x, {
|
|
45
|
-
"aria-hidden": !0,
|
|
46
|
-
className: "ttw:size-4 ttw:shrink-0 ttw:opacity-50"
|
|
47
|
-
})
|
|
48
|
-
]
|
|
49
|
-
})
|
|
50
|
-
}), /* @__PURE__ */ y(d, {
|
|
51
|
-
id: `${R}-options`,
|
|
52
|
-
align: "start",
|
|
53
|
-
className: "ttw:w-[var(--radix-popover-trigger-width)] ttw:p-0",
|
|
54
|
-
children: /* @__PURE__ */ b(t, {
|
|
55
|
-
shouldFilter: !1,
|
|
56
|
-
children: [/* @__PURE__ */ y(r, {
|
|
57
|
-
value: T,
|
|
58
|
-
onValueChange: E,
|
|
59
|
-
placeholder: L.placeholder,
|
|
60
|
-
"aria-label": L.placeholder
|
|
61
|
-
}), /* @__PURE__ */ b(a, {
|
|
62
|
-
className: m("ttw:max-h-72", w),
|
|
63
|
-
children: [O ? /* @__PURE__ */ b("div", {
|
|
64
|
-
className: "ttw:flex ttw:flex-col ttw:gap-2 ttw:p-2",
|
|
65
|
-
"aria-busy": "true",
|
|
66
|
-
children: [/* @__PURE__ */ y("span", {
|
|
67
|
-
className: "ttw:sr-only",
|
|
68
|
-
children: L.loading
|
|
69
|
-
}), Array.from({ length: C }).map((e, t) => /* @__PURE__ */ b("div", {
|
|
70
|
-
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4 ttw:px-2 ttw:py-1.5",
|
|
71
|
-
children: [/* @__PURE__ */ y(p, {
|
|
72
|
-
height: 14,
|
|
73
|
-
width: "55%"
|
|
74
|
-
}), /* @__PURE__ */ y(p, {
|
|
75
|
-
height: 14,
|
|
76
|
-
width: "30%"
|
|
77
|
-
})]
|
|
78
|
-
}, t))]
|
|
79
|
-
}) : D.length === 0 ? /* @__PURE__ */ y("div", {
|
|
80
|
-
className: m("ttw:flex ttw:items-center ttw:justify-center ttw:py-6 ttw:text-center ttw:text-sm", w),
|
|
81
|
-
children: L.emptyResults
|
|
82
|
-
}) : /* @__PURE__ */ y(n, {
|
|
83
|
-
heading: N,
|
|
84
|
-
children: D.map((e, t) => /* @__PURE__ */ y(i, {
|
|
85
|
-
value: `${e.name} ${e.email} ${t}`,
|
|
86
|
-
onSelect: () => e.onSelect(),
|
|
87
|
-
children: /* @__PURE__ */ b("div", {
|
|
88
|
-
className: "ttw:flex ttw:min-w-0 ttw:flex-col",
|
|
89
|
-
children: [/* @__PURE__ */ y("span", {
|
|
90
|
-
className: "ttw:truncate ttw:text-foreground",
|
|
91
|
-
children: e.name
|
|
92
|
-
}), e.email ? /* @__PURE__ */ y("span", {
|
|
93
|
-
className: "ttw:truncate ttw:text-xs ttw:text-muted-foreground",
|
|
94
|
-
children: e.email
|
|
95
|
-
}) : null]
|
|
96
|
-
})
|
|
97
|
-
}, `${e.name}:${e.email}:${t}`))
|
|
98
|
-
}), k ? /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(o, {}), /* @__PURE__ */ b(i, {
|
|
99
|
-
value: "__add_vendor__",
|
|
100
|
-
onSelect: () => {
|
|
101
|
-
V(!1), k();
|
|
102
|
-
},
|
|
103
|
-
className: "ttw:sticky ttw:bottom-0 ttw:bg-popover ttw:text-primary",
|
|
104
|
-
children: [/* @__PURE__ */ y(S, { className: "ttw:size-4 ttw:text-primary" }), /* @__PURE__ */ b("div", {
|
|
105
|
-
className: "ttw:flex ttw:min-w-0 ttw:flex-col",
|
|
106
|
-
children: [/* @__PURE__ */ y("span", {
|
|
107
|
-
className: "ttw:truncate",
|
|
108
|
-
children: L.addVendorAction
|
|
109
|
-
}), P ? /* @__PURE__ */ y("span", {
|
|
110
|
-
className: "ttw:truncate ttw:text-xs ttw:text-muted-foreground",
|
|
111
|
-
children: P
|
|
112
|
-
}) : null]
|
|
113
|
-
})]
|
|
114
|
-
})] }) : null]
|
|
115
|
-
})]
|
|
116
|
-
})
|
|
117
|
-
})]
|
|
118
|
-
}),
|
|
119
|
-
M ? /* @__PURE__ */ y(s, {
|
|
120
|
-
id: z,
|
|
121
|
-
children: M
|
|
122
|
-
}) : null
|
|
123
|
-
]
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
export { T as VendorSearchCombobox, T as default };
|
|
1
|
+
import "./index22.js";
|
|
2
|
+
import "./index23.js";
|