@tesouro/embedded-components-react 0.2.266 → 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.
Files changed (39) hide show
  1. package/dist/index.css +45 -9
  2. package/dist/index.js +1 -1
  3. package/dist/lib/BillPayWidget.js +1 -1
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +6 -6
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +99 -7
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +7 -97
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +99 -4
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +4 -4
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +2 -41
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +43 -1
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +1 -50
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +48 -6
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +9 -5
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +8 -91
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +6 -2
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +7 -3
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +100 -6
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +3 -9
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +6 -83
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +9 -3
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +83 -6
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +2 -111
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +8 -1
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +103 -16
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +1 -0
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +25 -0
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +37 -27
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +15 -116
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +126 -31
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +32 -69
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +0 -3
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +34 -69
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +4 -0
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +261 -181
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +32 -33
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index7.js +2 -2
  37. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  38. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index5.js +1 -1
  39. package/package.json +1 -1
@@ -1,83 +1,48 @@
1
- import { Input as e, Label as t, Select as n, SelectContent as r, SelectItem as i, SelectTrigger as a, SelectValue as o } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { BILL_FORM_FIELDS_LABELS_EN as s } from "./index12.js";
3
- import { useId as c } from "react";
4
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
1
+ import { Input as e, Label as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { BILL_FORM_FIELDS_LABELS_EN as n } from "./index12.js";
3
+ import { useId as r } from "react";
4
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
5
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js
6
- var d = "__tesouro_no_payment_terms__";
7
- function f({ values: f, errors: p, onChange: m, paymentTermOptions: h = [], testId: g, labels: _ }) {
8
- let v = {
9
- ...s,
10
- ..._
11
- }, y = c(), b = (n, r, i) => {
12
- let a = `${y}-${n}`, o = `${a}-error`, s = p?.[n];
13
- return /* @__PURE__ */ u("div", {
6
+ function o({ values: o, errors: s, onChange: c, testId: l, labels: u }) {
7
+ let d = {
8
+ ...n,
9
+ ...u
10
+ }, f = r(), p = (n, r, l) => {
11
+ let u = `${f}-${n}`, d = `${u}-error`, p = s?.[n];
12
+ return /* @__PURE__ */ a("div", {
14
13
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
15
14
  children: [
16
- /* @__PURE__ */ l(t, {
17
- htmlFor: a,
15
+ /* @__PURE__ */ i(t, {
16
+ htmlFor: u,
18
17
  children: r
19
18
  }),
20
- /* @__PURE__ */ l(e, {
21
- id: a,
22
- type: i,
23
- value: f[n],
24
- "aria-invalid": s ? !0 : void 0,
25
- "aria-describedby": s ? o : void 0,
26
- onChange: (e) => m({ [n]: e.target.value })
19
+ /* @__PURE__ */ i(e, {
20
+ id: u,
21
+ type: l,
22
+ value: o[n],
23
+ "aria-invalid": p ? !0 : void 0,
24
+ "aria-describedby": p ? d : void 0,
25
+ onChange: (e) => c({ [n]: e.target.value })
27
26
  }),
28
- s ? /* @__PURE__ */ l("p", {
29
- id: o,
27
+ p ? /* @__PURE__ */ i("p", {
28
+ id: d,
30
29
  className: "ttw:text-sm ttw:text-destructive",
31
- children: s
30
+ children: p
32
31
  }) : null
33
32
  ]
34
33
  });
35
- }, x = `${y}-paymentTerms`, S = `${x}-error`, C = p?.paymentTerms;
36
- return /* @__PURE__ */ u("div", {
34
+ };
35
+ return /* @__PURE__ */ a("div", {
37
36
  className: "ttw:flex ttw:flex-col ttw:gap-4",
38
- "data-testid": g,
39
- children: [
40
- b("invoiceNumber", v.invoiceNumber),
41
- /* @__PURE__ */ u("div", {
42
- className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
43
- children: [b("invoiceDate", v.invoiceDate, "date"), b("dueDate", v.dueDate, "date")]
44
- }),
45
- /* @__PURE__ */ u("div", {
46
- className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
47
- children: [/* @__PURE__ */ u("div", {
48
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
49
- children: [
50
- /* @__PURE__ */ l(t, {
51
- htmlFor: x,
52
- children: v.paymentTerms
53
- }),
54
- /* @__PURE__ */ u(n, {
55
- value: f.paymentTerms || d,
56
- onValueChange: (e) => m({ paymentTerms: e === d ? "" : e }),
57
- children: [/* @__PURE__ */ l(a, {
58
- id: x,
59
- className: "ttw:w-full",
60
- "aria-invalid": C ? !0 : void 0,
61
- "aria-describedby": C ? S : void 0,
62
- children: /* @__PURE__ */ l(o, { placeholder: v.paymentTermsPlaceholder })
63
- }), /* @__PURE__ */ u(r, { children: [/* @__PURE__ */ l(i, {
64
- value: d,
65
- children: v.paymentTermsNone
66
- }), h.map((e) => /* @__PURE__ */ l(i, {
67
- value: e.value,
68
- children: e.label
69
- }, e.value))] })]
70
- }),
71
- C ? /* @__PURE__ */ l("p", {
72
- id: S,
73
- className: "ttw:text-sm ttw:text-destructive",
74
- children: C
75
- }) : null
76
- ]
77
- }), b("poNumber", v.poNumber)]
78
- })
79
- ]
37
+ "data-testid": l,
38
+ children: [/* @__PURE__ */ a("div", {
39
+ className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
40
+ children: [p("invoiceDate", d.invoiceDate, "date"), p("dueDate", d.dueDate, "date")]
41
+ }), /* @__PURE__ */ a("div", {
42
+ className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
43
+ children: [p("invoiceNumber", d.invoiceNumber), p("poNumber", d.poNumber)]
44
+ })]
80
45
  });
81
46
  }
82
47
  //#endregion
83
- export { f as BillFormFields, f as default };
48
+ export { o as BillFormFields, o as default };
@@ -9,6 +9,10 @@ var e = {
9
9
  quantity: "Quantity",
10
10
  price: "Price",
11
11
  amount: "Amount",
12
+ currencySymbol: "$",
13
+ discount: "Discounts",
14
+ tax: "Tax",
15
+ totalAmount: "Total amount",
12
16
  addLineItem: "+ Add line item",
13
17
  increaseQuantity: (e) => `Increase quantity — line item ${e}`,
14
18
  decreaseQuantity: (e) => `Decrease quantity — line item ${e}`,
@@ -1,205 +1,285 @@
1
- import { Button as e, Input as t, Label as n, Select as r, SelectContent as i, SelectItem as a, SelectTrigger as o, SelectValue as s, Typography as c } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { LINE_ITEMS_SECTION_LABELS_EN as l } from "./index15.js";
3
- import { useId as u } from "react";
4
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
5
- import { Minus as p, Plus as m, Trash2 as h } from "lucide-react";
1
+ import { Button as e, Input as t, InputGroup as n, InputGroupAddon as r, InputGroupInput as i, Label as a, Select as o, SelectContent as s, SelectItem as c, SelectTrigger as l, SelectValue as u, Typography as d } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { LINE_ITEMS_SECTION_LABELS_EN as f } from "./index15.js";
3
+ import { useId as p } from "react";
4
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
5
+ import { Minus as g, Plus as _, Trash2 as v } from "lucide-react";
6
6
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js
7
- function g({ items: g, glCodeOptions: _, totalAmountLabel: v, onAddLineItem: y, errors: b, disabled: x, testId: S, labels: C }) {
8
- let w = {
9
- ...l,
10
- ...C
11
- }, T = u(), E = g.length > 1;
12
- return /* @__PURE__ */ f("section", {
7
+ function y({ items: y, glCodeOptions: b, discount: x, onDiscountChange: S, tax: C, onTaxChange: w, total: T, onTotalChange: E, onAddLineItem: D, errors: O, disabled: k, testId: A, labels: j }) {
8
+ let M = {
9
+ ...f,
10
+ ...j
11
+ }, N = p(), P = y.length > 1;
12
+ return /* @__PURE__ */ h("section", {
13
13
  className: "ttw:flex ttw:flex-col ttw:gap-3",
14
- "data-testid": S,
14
+ "data-testid": A,
15
15
  children: [
16
- /* @__PURE__ */ d(c, {
16
+ /* @__PURE__ */ m(d, {
17
17
  component: "h2",
18
18
  variant: "h6",
19
19
  className: "ttw:font-semibold",
20
- children: w.heading
20
+ children: M.heading
21
21
  }),
22
- /* @__PURE__ */ d("p", {
22
+ /* @__PURE__ */ m("p", {
23
23
  className: "ttw:text-sm ttw:text-muted-foreground",
24
- children: w.helpText
24
+ children: M.helpText
25
25
  }),
26
- g.map((c, l) => {
27
- let u = `${T}-${c.id}`, g = b?.[c.id], v = (e) => `${u}-${e}-error`, y = (e) => g?.[e], S = (e) => {
28
- let t = y(e);
29
- return t ? /* @__PURE__ */ d("p", {
30
- id: v(e),
26
+ y.map((d, f) => {
27
+ let p = `${N}-${d.id}`, y = O?.[d.id], x = (e) => `${p}-${e}-error`, S = (e) => y?.[e], C = (e) => {
28
+ let t = S(e);
29
+ return t ? /* @__PURE__ */ m("p", {
30
+ id: x(e),
31
31
  className: "ttw:text-sm ttw:text-destructive",
32
32
  children: t
33
33
  }) : null;
34
34
  };
35
- return /* @__PURE__ */ d("div", {
35
+ return /* @__PURE__ */ m("div", {
36
36
  className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-muted/30 ttw:p-4",
37
- children: /* @__PURE__ */ f("div", {
38
- className: "ttw:flex ttw:items-start ttw:gap-2",
37
+ children: /* @__PURE__ */ h("div", {
38
+ className: "ttw:@container/line-item ttw:flex ttw:flex-col ttw:gap-3",
39
39
  children: [
40
- E ? /* @__PURE__ */ f("span", {
41
- className: "ttw:pt-7 ttw:text-sm ttw:text-muted-foreground",
42
- children: [l + 1, "."]
43
- }) : null,
44
- /* @__PURE__ */ f("div", {
45
- className: "ttw:flex ttw:flex-1 ttw:flex-col ttw:gap-3",
46
- children: [/* @__PURE__ */ f("div", {
47
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
48
- children: [
49
- /* @__PURE__ */ d(n, {
50
- htmlFor: `${u}-description`,
51
- children: w.description
52
- }),
53
- /* @__PURE__ */ d(t, {
54
- id: `${u}-description`,
55
- placeholder: w.descriptionPlaceholder,
56
- value: c.description,
57
- disabled: x,
58
- "aria-invalid": y("description") ? !0 : void 0,
59
- "aria-describedby": y("description") ? v("description") : void 0,
60
- onChange: (e) => c.onChange({ description: e.target.value })
61
- }),
62
- S("description")
63
- ]
64
- }), /* @__PURE__ */ f("div", {
65
- className: "ttw:grid ttw:grid-cols-4 ttw:gap-3",
66
- children: [
67
- /* @__PURE__ */ f("div", {
68
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
69
- children: [
70
- /* @__PURE__ */ d(n, {
71
- htmlFor: `${u}-gl-code`,
72
- children: w.glCode
73
- }),
74
- /* @__PURE__ */ f(r, {
75
- value: c.glCode,
76
- disabled: x,
77
- onValueChange: (e) => c.onChange({ glCode: e }),
78
- children: [/* @__PURE__ */ d(o, {
79
- id: `${u}-gl-code`,
80
- "aria-invalid": y("glCode") ? !0 : void 0,
81
- "aria-describedby": y("glCode") ? v("glCode") : void 0,
82
- children: /* @__PURE__ */ d(s, { placeholder: w.glCodePlaceholder })
83
- }), /* @__PURE__ */ d(i, { children: _.map((e) => /* @__PURE__ */ d(a, {
84
- value: e.value,
85
- children: e.label
86
- }, e.value)) })]
87
- }),
88
- S("glCode")
89
- ]
90
- }),
91
- /* @__PURE__ */ f("div", {
92
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
93
- children: [
94
- /* @__PURE__ */ d(n, {
95
- htmlFor: `${u}-quantity`,
96
- children: w.quantity
97
- }),
98
- /* @__PURE__ */ f("div", {
99
- className: "ttw:flex ttw:items-center ttw:gap-1",
100
- children: [
101
- /* @__PURE__ */ d(e, {
102
- type: "button",
103
- variant: "outline",
104
- size: "icon",
105
- disabled: x,
106
- "aria-label": w.decreaseQuantity(l + 1),
107
- onClick: () => c.onQuantityStep(-1),
108
- children: /* @__PURE__ */ d(p, { className: "ttw:size-3.5" })
109
- }),
110
- /* @__PURE__ */ d(t, {
111
- id: `${u}-quantity`,
112
- inputMode: "decimal",
113
- className: "ttw:text-center",
114
- value: c.quantity,
115
- disabled: x,
116
- "aria-invalid": y("quantity") ? !0 : void 0,
117
- "aria-describedby": y("quantity") ? v("quantity") : void 0,
118
- onChange: (e) => c.onChange({ quantity: e.target.value })
119
- }),
120
- /* @__PURE__ */ d(e, {
121
- type: "button",
122
- variant: "outline",
123
- size: "icon",
124
- disabled: x,
125
- "aria-label": w.increaseQuantity(l + 1),
126
- onClick: () => c.onQuantityStep(1),
127
- children: /* @__PURE__ */ d(m, { className: "ttw:size-3.5" })
128
- })
129
- ]
130
- }),
131
- S("quantity")
132
- ]
133
- }),
134
- /* @__PURE__ */ f("div", {
135
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
136
- children: [
137
- /* @__PURE__ */ d(n, {
138
- htmlFor: `${u}-price`,
139
- children: w.price
140
- }),
141
- /* @__PURE__ */ d(t, {
142
- id: `${u}-price`,
143
- inputMode: "decimal",
144
- value: c.price,
145
- disabled: x,
146
- "aria-invalid": y("price") ? !0 : void 0,
147
- "aria-describedby": y("price") ? v("price") : void 0,
148
- onChange: (e) => c.onChange({ price: e.target.value })
149
- }),
150
- S("price")
151
- ]
152
- }),
153
- /* @__PURE__ */ f("div", {
154
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
155
- children: [
156
- /* @__PURE__ */ d(n, {
157
- htmlFor: `${u}-amount`,
158
- children: w.amount
159
- }),
160
- /* @__PURE__ */ d(t, {
161
- id: `${u}-amount`,
162
- inputMode: "decimal",
163
- value: c.amount,
164
- disabled: x,
165
- "aria-invalid": y("amount") ? !0 : void 0,
166
- "aria-describedby": y("amount") ? v("amount") : void 0,
167
- onChange: (e) => c.onChange({ amount: e.target.value })
168
- }),
169
- S("amount")
170
- ]
171
- })
172
- ]
173
- })]
40
+ /* @__PURE__ */ h("div", {
41
+ className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-2",
42
+ children: [/* @__PURE__ */ h("div", {
43
+ className: "ttw:flex ttw:items-center ttw:gap-2",
44
+ children: [P ? /* @__PURE__ */ h("span", {
45
+ className: "ttw:text-sm ttw:text-muted-foreground",
46
+ children: [f + 1, "."]
47
+ }) : null, /* @__PURE__ */ m(a, {
48
+ htmlFor: `${p}-description`,
49
+ children: M.description
50
+ })]
51
+ }), P ? /* @__PURE__ */ m(e, {
52
+ type: "button",
53
+ variant: "ghost",
54
+ size: "icon",
55
+ disabled: k,
56
+ "aria-label": M.removeLineItem(f + 1),
57
+ onClick: d.onRemove,
58
+ children: /* @__PURE__ */ m(v, { className: "ttw:size-4" })
59
+ }) : null]
174
60
  }),
175
- E ? /* @__PURE__ */ d(e, {
176
- type: "button",
177
- variant: "ghost",
178
- size: "icon",
179
- disabled: x,
180
- "aria-label": w.removeLineItem(l + 1),
181
- onClick: c.onRemove,
182
- children: /* @__PURE__ */ d(h, { className: "ttw:size-4" })
183
- }) : null
61
+ /* @__PURE__ */ h("div", {
62
+ className: "ttw:flex ttw:flex-col ttw:gap-1.5",
63
+ children: [/* @__PURE__ */ m(t, {
64
+ id: `${p}-description`,
65
+ placeholder: M.descriptionPlaceholder,
66
+ value: d.description,
67
+ disabled: k,
68
+ "aria-invalid": S("description") ? !0 : void 0,
69
+ "aria-describedby": S("description") ? x("description") : void 0,
70
+ onChange: (e) => d.onChange({ description: e.target.value })
71
+ }), C("description")]
72
+ }),
73
+ /* @__PURE__ */ h("div", {
74
+ className: "ttw:grid ttw:grid-cols-3 ttw:@lg/line-item:grid-cols-6 ttw:gap-3",
75
+ children: [
76
+ /* @__PURE__ */ h("div", {
77
+ className: "ttw:col-span-3 ttw:flex ttw:flex-col ttw:gap-1.5",
78
+ children: [
79
+ /* @__PURE__ */ m(a, {
80
+ htmlFor: `${p}-gl-code`,
81
+ children: M.glCode
82
+ }),
83
+ /* @__PURE__ */ h(o, {
84
+ value: d.glCode,
85
+ disabled: k,
86
+ onValueChange: (e) => d.onChange({ glCode: e }),
87
+ children: [/* @__PURE__ */ m(l, {
88
+ id: `${p}-gl-code`,
89
+ "aria-invalid": S("glCode") ? !0 : void 0,
90
+ "aria-describedby": S("glCode") ? x("glCode") : void 0,
91
+ children: /* @__PURE__ */ m(u, { placeholder: M.glCodePlaceholder })
92
+ }), /* @__PURE__ */ m(s, { children: b.map((e) => /* @__PURE__ */ m(c, {
93
+ value: e.value,
94
+ children: e.label
95
+ }, e.value)) })]
96
+ }),
97
+ C("glCode")
98
+ ]
99
+ }),
100
+ /* @__PURE__ */ h("div", {
101
+ className: "ttw:col-span-1 ttw:flex ttw:flex-col ttw:gap-1.5",
102
+ children: [
103
+ /* @__PURE__ */ m(a, {
104
+ htmlFor: `${p}-quantity`,
105
+ children: M.quantity
106
+ }),
107
+ /* @__PURE__ */ h(n, {
108
+ className: "ttw:h-9 ttw:rounded-md ttw:border ttw:border-input ttw:shadow-xs ttw:has-[:focus-visible]:border-ring ttw:has-[:focus-visible]:ring-[3px] ttw:has-[:focus-visible]:ring-ring/50 ttw:has-[[aria-invalid=true]]:border-destructive ttw:has-[[aria-invalid=true]]:ring-destructive/20",
109
+ children: [
110
+ /* @__PURE__ */ m(e, {
111
+ type: "button",
112
+ variant: "ghost",
113
+ size: "icon",
114
+ className: "ttw:h-full ttw:shrink-0 ttw:rounded-r-none",
115
+ disabled: k,
116
+ "aria-label": M.decreaseQuantity(f + 1),
117
+ onClick: () => d.onQuantityStep(-1),
118
+ children: /* @__PURE__ */ m(g, { className: "ttw:size-3.5" })
119
+ }),
120
+ /* @__PURE__ */ m(i, {
121
+ id: `${p}-quantity`,
122
+ inputMode: "decimal",
123
+ className: "ttw:min-w-0 ttw:flex-1 ttw:rounded-none ttw:border-0 ttw:text-center ttw:shadow-none ttw:focus-visible:ring-0",
124
+ value: d.quantity,
125
+ disabled: k,
126
+ "aria-invalid": S("quantity") ? !0 : void 0,
127
+ "aria-describedby": S("quantity") ? x("quantity") : void 0,
128
+ onChange: (e) => d.onChange({ quantity: e.target.value })
129
+ }),
130
+ /* @__PURE__ */ m(e, {
131
+ type: "button",
132
+ variant: "ghost",
133
+ size: "icon",
134
+ className: "ttw:h-full ttw:shrink-0 ttw:rounded-l-none",
135
+ disabled: k,
136
+ "aria-label": M.increaseQuantity(f + 1),
137
+ onClick: () => d.onQuantityStep(1),
138
+ children: /* @__PURE__ */ m(_, { className: "ttw:size-3.5" })
139
+ })
140
+ ]
141
+ }),
142
+ C("quantity")
143
+ ]
144
+ }),
145
+ /* @__PURE__ */ h("div", {
146
+ className: "ttw:col-span-1 ttw:flex ttw:flex-col ttw:gap-1.5",
147
+ children: [
148
+ /* @__PURE__ */ m(a, {
149
+ htmlFor: `${p}-price`,
150
+ children: M.price
151
+ }),
152
+ /* @__PURE__ */ h(n, { children: [/* @__PURE__ */ m(r, {
153
+ align: "inline-start",
154
+ "aria-hidden": !0,
155
+ children: M.currencySymbol
156
+ }), /* @__PURE__ */ m(i, {
157
+ id: `${p}-price`,
158
+ "data-has-start-addon": !0,
159
+ inputMode: "decimal",
160
+ className: "ttw:text-right ttw:aria-invalid:border-destructive ttw:aria-invalid:ring-destructive/20",
161
+ value: d.price,
162
+ disabled: k,
163
+ "aria-invalid": S("price") ? !0 : void 0,
164
+ "aria-describedby": S("price") ? x("price") : void 0,
165
+ onChange: (e) => d.onChange({ price: e.target.value })
166
+ })] }),
167
+ C("price")
168
+ ]
169
+ }),
170
+ /* @__PURE__ */ h("div", {
171
+ className: "ttw:col-span-1 ttw:flex ttw:flex-col ttw:gap-1.5",
172
+ children: [
173
+ /* @__PURE__ */ m(a, {
174
+ htmlFor: `${p}-amount`,
175
+ children: M.amount
176
+ }),
177
+ /* @__PURE__ */ h(n, { children: [/* @__PURE__ */ m(r, {
178
+ align: "inline-start",
179
+ "aria-hidden": !0,
180
+ children: M.currencySymbol
181
+ }), /* @__PURE__ */ m(i, {
182
+ id: `${p}-amount`,
183
+ "data-has-start-addon": !0,
184
+ inputMode: "decimal",
185
+ className: "ttw:text-right ttw:aria-invalid:border-destructive ttw:aria-invalid:ring-destructive/20",
186
+ value: d.amount,
187
+ disabled: k,
188
+ "aria-invalid": S("amount") ? !0 : void 0,
189
+ "aria-describedby": S("amount") ? x("amount") : void 0,
190
+ onChange: (e) => d.onChange({ amount: e.target.value })
191
+ })] }),
192
+ C("amount")
193
+ ]
194
+ })
195
+ ]
196
+ })
184
197
  ]
185
198
  })
186
- }, c.id);
199
+ }, d.id);
200
+ }),
201
+ /* @__PURE__ */ m(e, {
202
+ type: "button",
203
+ variant: "link",
204
+ disabled: k,
205
+ className: "ttw:self-start",
206
+ onClick: D,
207
+ children: M.addLineItem
187
208
  }),
188
- /* @__PURE__ */ f("div", {
189
- className: "ttw:flex ttw:items-center ttw:justify-between",
190
- children: [/* @__PURE__ */ d(e, {
191
- type: "button",
192
- variant: "link",
193
- disabled: x,
194
- onClick: y,
195
- children: w.addLineItem
196
- }), /* @__PURE__ */ d("span", {
197
- className: "ttw:text-sm ttw:text-foreground",
198
- children: v
199
- })]
209
+ /* @__PURE__ */ h("div", {
210
+ className: "ttw:flex ttw:flex-col ttw:gap-2 ttw:border-t ttw:border-border ttw:pt-3",
211
+ children: [
212
+ /* @__PURE__ */ h("div", {
213
+ className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4",
214
+ children: [/* @__PURE__ */ m(a, {
215
+ htmlFor: `${N}-discount`,
216
+ children: M.discount
217
+ }), /* @__PURE__ */ h(n, {
218
+ className: "ttw:w-36",
219
+ children: [/* @__PURE__ */ m(r, {
220
+ align: "inline-start",
221
+ "aria-hidden": !0,
222
+ children: M.currencySymbol
223
+ }), /* @__PURE__ */ m(i, {
224
+ id: `${N}-discount`,
225
+ "data-has-start-addon": !0,
226
+ inputMode: "decimal",
227
+ className: "ttw:text-right",
228
+ value: x,
229
+ disabled: k,
230
+ onChange: (e) => S(e.target.value)
231
+ })]
232
+ })]
233
+ }),
234
+ /* @__PURE__ */ h("div", {
235
+ className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4",
236
+ children: [/* @__PURE__ */ m(a, {
237
+ htmlFor: `${N}-tax`,
238
+ children: M.tax
239
+ }), /* @__PURE__ */ h(n, {
240
+ className: "ttw:w-36",
241
+ children: [/* @__PURE__ */ m(r, {
242
+ align: "inline-start",
243
+ "aria-hidden": !0,
244
+ children: M.currencySymbol
245
+ }), /* @__PURE__ */ m(i, {
246
+ id: `${N}-tax`,
247
+ "data-has-start-addon": !0,
248
+ inputMode: "decimal",
249
+ className: "ttw:text-right",
250
+ value: C,
251
+ disabled: k,
252
+ onChange: (e) => w(e.target.value)
253
+ })]
254
+ })]
255
+ }),
256
+ /* @__PURE__ */ h("div", {
257
+ className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4",
258
+ children: [/* @__PURE__ */ m(a, {
259
+ htmlFor: `${N}-total`,
260
+ className: "ttw:font-semibold",
261
+ children: M.totalAmount
262
+ }), /* @__PURE__ */ h(n, {
263
+ className: "ttw:w-36",
264
+ children: [/* @__PURE__ */ m(r, {
265
+ align: "inline-start",
266
+ "aria-hidden": !0,
267
+ children: M.currencySymbol
268
+ }), /* @__PURE__ */ m(i, {
269
+ id: `${N}-total`,
270
+ "data-has-start-addon": !0,
271
+ inputMode: "decimal",
272
+ className: "ttw:text-right ttw:font-semibold",
273
+ value: T,
274
+ disabled: k,
275
+ onChange: (e) => E(e.target.value)
276
+ })]
277
+ })]
278
+ })
279
+ ]
200
280
  })
201
281
  ]
202
282
  });
203
283
  }
204
284
  //#endregion
205
- export { g as LineItemsSection, g as default };
285
+ export { y as LineItemsSection, y as default };