@tesouro/embedded-components-react 0.5.227 → 0.5.230

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 (90) hide show
  1. package/README.md +22 -21
  2. package/dist/index.d.ts +87 -34
  3. package/dist/index.js +1 -1
  4. package/dist/lib/ReceivablesWidget.d.ts +87 -34
  5. package/dist/lib/ReceivablesWidget.js +1 -1
  6. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +5 -5
  7. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +29 -59
  8. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index5.js +32 -33
  10. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js +34 -32
  11. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js +1 -1
  12. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index10.js +120 -52
  14. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index11.js +44 -100
  15. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +93 -442
  16. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index13.js +356 -201
  17. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index14.js +225 -157
  18. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index15.js +152 -21
  19. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index16.js +18 -221
  20. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index17.js +220 -31
  21. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index18.js +125 -124
  22. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +58 -150
  23. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index20.js +232 -46
  24. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +303 -122
  25. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index22.js +43 -58
  26. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index23.js +125 -98
  27. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index24.js +140 -106
  28. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index25.js +46 -232
  29. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index26.js +119 -29
  30. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index27.js +81 -613
  31. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index28.js +116 -39
  32. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index29.js +27 -33
  33. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index30.js +634 -72
  34. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index31.js +39 -119
  35. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index32.js +36 -317
  36. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index33.js +82 -0
  37. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index34.js +139 -0
  38. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index35.js +340 -0
  39. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index5.js +1 -1
  40. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index7.js +15 -2
  41. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index8.js +55 -468
  42. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +443 -97
  43. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +24 -22
  44. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js +32 -2
  45. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +205 -84
  46. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +161 -3
  47. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +12 -20
  48. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +25 -1
  49. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +4 -3
  50. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +95 -3
  51. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +3 -18
  52. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +24 -1
  53. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +42 -4
  54. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index2.js +14 -7
  55. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +19 -12
  56. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +73 -1
  57. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +17 -261
  58. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +12 -44
  59. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +28 -68
  60. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +288 -479
  61. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +1 -106
  62. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +48 -0
  63. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +72 -2
  64. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +496 -4
  65. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index3.js +121 -27
  66. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +106 -1
  67. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +2 -28
  68. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +4 -236
  69. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +0 -2
  70. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +90 -239
  71. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +24 -89
  72. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +231 -54
  73. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +3 -353
  74. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +249 -0
  75. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +100 -207
  76. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +93 -0
  77. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +59 -0
  78. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +353 -0
  79. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index5.js +35 -29
  80. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +2 -216
  81. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +9 -159
  82. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js +27 -14
  83. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +216 -23
  84. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +40 -40
  85. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +189 -211
  86. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +43 -59
  87. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  88. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/index.js +12 -12
  89. package/package.json +1 -1
  90. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +0 -100
@@ -1,496 +1,305 @@
1
- import { Alert as e, AlertDescription as t, Button as n, Checkbox as r, Field as i, FieldContent as a, FieldError as o, FieldLabel as s, Input as c, InputGroup as l, InputGroupAddon as u, InputGroupInput as d, Label as f, RadioGroup as p, RadioGroupItem as m, Select as h, SelectContent as g, SelectItem as _, SelectTrigger as v, SelectValue as y, Separator as b, Sheet as x, SheetContent as S, SheetDescription as C, SheetFooter as w, SheetHeader as T, SheetTitle as ee, Spinner as te, Typography as E, cn as D } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { RECEIVABLE_FORM_SHEET_LABELS_EN as ne } from "./index4.js";
3
- import { ReceivableFormTotals as re } from "./index23.js";
4
- import { ReceivableNotesSection as O } from "./index24.js";
5
- import { useId as ie } from "react";
6
- import { jsx as k, jsxs as A } from "react/jsx-runtime";
7
- import { MinusIcon as j, PlusIcon as M, Trash2Icon as N } from "lucide-react";
1
+ import { Accordion as e, AccordionContent as t, AccordionItem as n, AccordionTrigger as r, Badge as i, Button as a, Sheet as o, SheetContent as s, SheetDescription as c, SheetHeader as l, SheetTitle as u, Tooltip as d, TooltipContent as f, TooltipProvider as p, TooltipTrigger as m, cn as h } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { ErrorState as g } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
3
+ import "../../../shared/ui/dist/index.js";
4
+ import { RECEIVABLE_DETAILS_PANEL_LABELS_EN as _ } from "./index9.js";
5
+ import { ReceivableStatusBadge as v } from "./index18.js";
6
+ import { ACTION_ICON as y, ACTION_LABEL_KEY as b, STATUS_ICON as x, headerIconButtonClass as S } from "./index19.js";
7
+ import { AmountCell as C } from "./index20.js";
8
+ import { ATTACHMENTS_ITEM_VALUE as w, AttachmentsItem as T } from "./index21.js";
9
+ import { CloseButton as E } from "./index22.js";
10
+ import { InfoRow as D } from "./index23.js";
11
+ import { OverflowMenu as O } from "./index24.js";
12
+ import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
13
+ import { CircleAlert as M, EyeIcon as N, Repeat as P } from "lucide-react";
8
14
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js
9
- var P = "__none__", F = "__manage__";
10
- function I({ message: e }) {
11
- return e ? /* @__PURE__ */ k("p", {
12
- className: "ttw:text-sm ttw:text-destructive",
13
- children: e
14
- }) : null;
15
- }
16
- function L({ formId: e, lineItem: t, errors: i, controls: a, focusOnMount: o, canRemove: s, unitOptions: c, currencySymbol: f, labels: p, renderProductSelector: m, onChange: b, onCommit: x, onQuantityStep: S, onManageUnits: C, onRemove: w }) {
17
- let T = `${e}-line-${t.id}`;
18
- return /* @__PURE__ */ A("li", {
19
- className: "ttw:flex ttw:h-9 ttw:items-center ttw:gap-2.5",
20
- children: [
21
- /* @__PURE__ */ k("div", {
22
- className: "ttw:min-w-30 ttw:flex-1",
23
- children: m(t, {
24
- inputId: `${T}-name`,
25
- invalid: !!i?.name,
26
- focusOnMount: o
27
- })
28
- }),
29
- /* @__PURE__ */ A("div", {
30
- className: D("ttw:flex ttw:h-9 ttw:w-26 ttw:min-w-26 ttw:items-center ttw:rounded-md ttw:border ttw:border-input ttw:shadow-xs", i?.quantity && "ttw:border-destructive"),
31
- children: [
32
- /* @__PURE__ */ k("button", {
33
- type: "button",
34
- "aria-label": p.decreaseQuantityButton,
35
- disabled: a ? !a.canDecreaseQuantity : !1,
36
- className: "ttw:flex ttw:size-6 ttw:shrink-0 ttw:items-center ttw:justify-center ttw:rounded-sm ttw:text-muted-foreground ttw:hover:bg-accent ttw:disabled:pointer-events-none ttw:disabled:opacity-50",
37
- onClick: () => S(-1),
38
- children: /* @__PURE__ */ k(j, { className: "ttw:size-3.5" })
39
- }),
40
- /* @__PURE__ */ k("input", {
41
- id: `${T}-quantity`,
42
- "aria-label": p.quantityLabel,
43
- "aria-invalid": !!i?.quantity || void 0,
44
- type: "text",
45
- inputMode: "decimal",
46
- className: "ttw:h-full ttw:w-full ttw:min-w-0 ttw:bg-transparent ttw:px-0 ttw:text-center ttw:text-sm ttw:outline-none",
47
- value: t.quantity,
48
- onChange: (e) => b({ quantity: e.target.value }),
49
- onBlur: () => x("quantity")
50
- }),
51
- /* @__PURE__ */ k("button", {
52
- type: "button",
53
- "aria-label": p.increaseQuantityButton,
54
- disabled: a ? !a.canIncreaseQuantity : !1,
55
- className: "ttw:flex ttw:size-6 ttw:shrink-0 ttw:items-center ttw:justify-center ttw:rounded-sm ttw:text-muted-foreground ttw:hover:bg-accent ttw:disabled:pointer-events-none ttw:disabled:opacity-50",
56
- onClick: () => S(1),
57
- children: /* @__PURE__ */ k(M, { className: "ttw:size-3.5" })
58
- })
59
- ]
60
- }),
61
- /* @__PURE__ */ A(h, {
62
- value: t.unit || P,
63
- onValueChange: (e) => {
64
- if (e === F) {
65
- C?.();
66
- return;
67
- }
68
- b({ unit: e === P ? "" : e });
69
- },
70
- children: [/* @__PURE__ */ k(v, {
71
- id: `${T}-unit`,
72
- "aria-label": p.unitLabel,
73
- "aria-invalid": !!i?.measureUnit || void 0,
74
- className: "ttw:w-22",
75
- children: /* @__PURE__ */ k(y, {
76
- className: "ttw:truncate",
77
- placeholder: p.unitPlaceholder
78
- })
79
- }), /* @__PURE__ */ A(g, { children: [
80
- C && /* @__PURE__ */ A(_, {
81
- value: F,
82
- className: "ttw:font-semibold ttw:text-primary ttw:hover:text-primary ttw:focus:text-primary",
83
- children: [/* @__PURE__ */ k(M, { className: "ttw:text-primary" }), p.manageUnitsOption]
84
- }),
85
- /* @__PURE__ */ k(_, {
86
- value: P,
87
- children: p.unitNone
88
- }),
89
- c.map((e) => /* @__PURE__ */ k(_, {
90
- value: e.value,
91
- children: e.label
92
- }, e.value))
93
- ] })]
94
- }),
95
- /* @__PURE__ */ A(l, {
96
- className: "ttw:w-full ttw:max-w-41 ttw:min-w-29",
97
- children: [/* @__PURE__ */ k(u, {
98
- align: "inline-start",
99
- children: f
100
- }), /* @__PURE__ */ k(d, {
101
- id: `${T}-price`,
102
- "aria-label": p.priceLabel,
103
- "aria-invalid": !!i?.price || void 0,
104
- "data-has-start-addon": !0,
105
- type: "text",
106
- inputMode: "decimal",
107
- className: "ttw:text-right",
108
- value: t.price,
109
- onChange: (e) => b({ price: e.target.value }),
110
- onBlur: () => x("price")
111
- })]
112
- }),
113
- /* @__PURE__ */ k("div", {
114
- className: "ttw:flex ttw:w-12 ttw:min-w-12 ttw:items-center ttw:justify-center",
115
- children: /* @__PURE__ */ k(r, {
116
- id: `${T}-taxable`,
117
- "aria-label": p.taxableLabel,
118
- checked: t.taxable,
119
- onCheckedChange: (e) => b({ taxable: e === !0 })
120
- })
121
- }),
122
- s && /* @__PURE__ */ k(n, {
123
- type: "button",
124
- variant: "ghost",
125
- size: "sm",
126
- "aria-label": p.removeLineItemButton,
127
- className: "ttw:w-10 ttw:rounded-none ttw:border-l ttw:border-border ttw:pl-4 ttw:text-muted-foreground ttw:hover:bg-transparent ttw:hover:text-destructive ttw:has-[>svg]:pr-0",
128
- onClick: w,
129
- children: /* @__PURE__ */ k(N, {})
130
- })
131
- ]
132
- });
133
- }
134
- function ae({ inputId: e, discountType: t, value: n, error: r, currencySymbol: c, disabled: f, labels: p, onChange: m, onTypeChange: h, onFocus: g, onBlur: _ }) {
135
- let v = `${e}-error`, y = [{
136
- type: "amount",
137
- label: c,
138
- ariaLabel: p.discountAmountOptionAriaLabel
139
- }, {
140
- type: "percentage",
141
- label: p.discountPercentageOption,
142
- ariaLabel: p.discountPercentageOptionAriaLabel
143
- }];
144
- return /* @__PURE__ */ A(i, {
145
- className: "ttw:flex-col",
146
- children: [/* @__PURE__ */ A(a, {
147
- className: "ttw:flex-row ttw:items-center ttw:justify-end",
148
- children: [/* @__PURE__ */ k(s, {
149
- htmlFor: e,
150
- className: D(r && "ttw:text-destructive"),
151
- children: p.discountLabel
152
- }), /* @__PURE__ */ A(l, {
153
- className: "ttw:w-40 ttw:overflow-hidden",
154
- children: [/* @__PURE__ */ k(u, {
155
- align: "inline-start",
156
- className: "ttw:gap-0 ttw:self-stretch ttw:p-0 ttw:has-[>button]:ml-0",
157
- children: y.map((e) => /* @__PURE__ */ k("button", {
158
- type: "button",
159
- "aria-label": e.ariaLabel,
160
- "aria-pressed": t === e.type,
161
- disabled: f,
162
- className: D("ttw:pointer-events-auto ttw:h-full ttw:w-9 ttw:cursor-pointer ttw:border-r ttw:border-input ttw:text-sm ttw:transition-colors ttw:disabled:pointer-events-none ttw:disabled:opacity-50", t === e.type ? "ttw:bg-primary ttw:text-primary-foreground" : "ttw:text-muted-foreground ttw:hover:bg-muted ttw:hover:text-foreground"),
163
- onClick: () => h(e.type),
164
- children: e.label
165
- }, e.type))
166
- }), /* @__PURE__ */ k(d, {
167
- id: e,
168
- type: "text",
169
- inputMode: "decimal",
170
- className: "ttw:text-right",
171
- "aria-invalid": !!r || void 0,
172
- "aria-describedby": r ? v : void 0,
173
- disabled: f,
174
- value: n,
175
- onChange: (e) => m(e.target.value),
176
- onFocus: g,
177
- onBlur: _
15
+ function F({ open: F, onOpenChange: I, details: L, unsupported: R, isLoading: z, isError: B, onActionClick: V, onClose: H, labels: U }) {
16
+ let W = {
17
+ ..._,
18
+ ...U
19
+ }, G = L?.panel, K = B ? {
20
+ title: W.errorTitle,
21
+ description: W.errorDescription
22
+ } : R, q = G?.amountTone === "danger", J = (e) => W[b[e]], Y = L ? x[L.status] : void 0;
23
+ return /* @__PURE__ */ A(o, {
24
+ open: F,
25
+ onOpenChange: I,
26
+ children: /* @__PURE__ */ j(s, {
27
+ showCloseButton: !1,
28
+ className: "ttw:w-180 ttw:overflow-y-auto ttw:p-0 ttw:sm:max-w-180",
29
+ children: [K || z || !L ? /* @__PURE__ */ A(E, {
30
+ label: W.closeButton,
31
+ onClose: H,
32
+ className: h(S, "ttw:absolute ttw:right-4 ttw:top-4 ttw:z-10")
33
+ }) : null, K ? /* @__PURE__ */ j("div", {
34
+ className: "ttw:p-6",
35
+ children: [/* @__PURE__ */ j(l, {
36
+ className: "ttw:sr-only",
37
+ children: [/* @__PURE__ */ A(u, { children: K.title }), /* @__PURE__ */ A(c, { children: W.hiddenDescription })]
38
+ }), /* @__PURE__ */ A(g, {
39
+ title: K.title,
40
+ description: K.description
178
41
  })]
179
- })]
180
- }), r && /* @__PURE__ */ k(o, {
181
- id: v,
182
- className: "ttw:text-right",
183
- children: r
184
- })]
185
- });
186
- }
187
- function R({ open: r, onOpenChange: j, mode: N = "create", values: P, errors: F, currencyOptions: R, unitOptions: oe, currencySymbol: z, lineItemControls: B, autoFocusLineItemId: V, lineItemsLoading: H, inProgress: U, customerSelector: W, renderProductSelector: G, onChange: K, onLineItemChange: q, onLineItemCommit: se, onLineItemQuantityStep: ce, onTaxRateCommit: J, onDiscountFocus: le, onDiscountCommit: ue, totals: de, onManageUnits: fe, onAddLineItem: pe, onRemoveLineItem: me, showDueDateField: Y, billingSection: he, remindersSection: ge, bankAccountSection: _e, attachmentsSection: ve, cancelDisabled: ye, draftButtonLabel: X, draftDisabled: be, primaryButtonLabel: xe, primaryDisabled: Se, scrollContainerRef: Ce, onSubmit: we, onDraftClick: Te, onPrimaryClick: Ee, onCancel: De, labels: Oe }) {
188
- let Z = {
189
- ...ne,
190
- ...Oe
191
- }, Q = ie(), $ = N === "edit", ke = D("ttw:grid ttw:gap-4", $ && Y ? "ttw:grid-cols-3" : "ttw:grid-cols-2");
192
- return /* @__PURE__ */ k(x, {
193
- open: r,
194
- onOpenChange: j,
195
- children: /* @__PURE__ */ A(S, {
196
- ref: Ce,
197
- className: "ttw:w-180 ttw:overflow-y-auto ttw:sm:max-w-180",
198
- children: [
199
- /* @__PURE__ */ A(T, { children: [/* @__PURE__ */ k(ee, { children: N === "edit" ? Z.editTitle : Z.createTitle }), /* @__PURE__ */ k(C, {
42
+ }) : z || !L || !G ? /* @__PURE__ */ j(l, {
43
+ className: "ttw:p-6",
44
+ children: [/* @__PURE__ */ A(u, { children: W.loadingTitle }), /* @__PURE__ */ A(c, {
200
45
  className: "ttw:sr-only",
201
- children: Z.hiddenDescription
202
- })] }),
203
- /* @__PURE__ */ A("form", {
204
- id: Q,
205
- onSubmit: (e) => {
206
- e.preventDefault(), e.stopPropagation(), we();
207
- },
208
- children: [/* @__PURE__ */ k("button", {
209
- type: "submit",
210
- className: "ttw:sr-only",
211
- tabIndex: -1,
212
- "aria-hidden": "true"
213
- }), /* @__PURE__ */ A("div", {
214
- className: "ttw:flex ttw:flex-col ttw:gap-5 ttw:px-6 ttw:pb-6",
46
+ children: W.hiddenDescription
47
+ })]
48
+ }) : /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ j(l, {
49
+ className: "ttw:flex ttw:flex-row ttw:items-start ttw:justify-between ttw:gap-2 ttw:space-y-0 ttw:px-6 ttw:py-4",
50
+ children: [/* @__PURE__ */ j("div", {
51
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
52
+ children: [
53
+ /* @__PURE__ */ A(u, {
54
+ className: "ttw:text-xl ttw:font-semibold ttw:text-foreground",
55
+ children: L.title
56
+ }),
57
+ G.subtitle ? /* @__PURE__ */ A("p", {
58
+ className: "ttw:text-sm ttw:text-muted-foreground",
59
+ children: G.subtitle
60
+ }) : null,
61
+ /* @__PURE__ */ A(c, {
62
+ className: "ttw:sr-only",
63
+ children: W.hiddenDescription
64
+ })
65
+ ]
66
+ }), /* @__PURE__ */ A(p, {
67
+ delayDuration: 500,
68
+ children: /* @__PURE__ */ j("div", {
69
+ className: "ttw:flex ttw:items-center ttw:gap-1.5",
70
+ children: [
71
+ L.pdfUrl ? /* @__PURE__ */ j(d, { children: [/* @__PURE__ */ A(m, {
72
+ asChild: !0,
73
+ children: /* @__PURE__ */ A(a, {
74
+ asChild: !0,
75
+ variant: "ghost",
76
+ size: "icon",
77
+ className: S,
78
+ children: /* @__PURE__ */ A("a", {
79
+ href: L.pdfUrl,
80
+ target: "_blank",
81
+ rel: "noreferrer",
82
+ "aria-label": W.viewPdfButton,
83
+ children: /* @__PURE__ */ A(N, { className: "ttw:size-4" })
84
+ })
85
+ })
86
+ }), /* @__PURE__ */ A(f, { children: W.viewPdfButton })] }) : null,
87
+ G.overflowActions.length > 0 ? /* @__PURE__ */ A(O, {
88
+ actions: G.overflowActions,
89
+ triggerLabel: W.moreActionsLabel,
90
+ getActionLabel: J,
91
+ onSelect: (e) => V(e, L),
92
+ className: S
93
+ }) : null,
94
+ /* @__PURE__ */ j(d, { children: [/* @__PURE__ */ A(m, {
95
+ asChild: !0,
96
+ children: /* @__PURE__ */ A(E, {
97
+ label: W.closeButton,
98
+ onClose: H,
99
+ className: S
100
+ })
101
+ }), /* @__PURE__ */ A(f, { children: W.closeButton })] })
102
+ ]
103
+ })
104
+ })]
105
+ }), /* @__PURE__ */ j("div", {
106
+ className: "ttw:flex ttw:flex-col",
107
+ children: [/* @__PURE__ */ A("div", {
108
+ className: "ttw:px-6",
109
+ children: /* @__PURE__ */ j("div", {
110
+ className: h("ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:bg-muted ttw:p-4", q && "ttw:border ttw:border-red-200"),
215
111
  children: [
216
112
  /* @__PURE__ */ A("div", {
217
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
218
- children: [
219
- /* @__PURE__ */ k(f, { children: Z.documentTypeLabel }),
220
- /* @__PURE__ */ A(p, {
221
- className: "ttw:flex ttw:flex-row ttw:gap-6",
222
- disabled: N === "edit",
223
- value: P.type,
224
- onValueChange: (e) => K({ type: e }),
225
- children: [/* @__PURE__ */ A("div", {
226
- className: "ttw:flex ttw:items-center ttw:gap-2",
227
- children: [/* @__PURE__ */ k(m, {
228
- value: "invoice",
229
- id: `${Q}-invoice`
230
- }), /* @__PURE__ */ k(f, {
231
- htmlFor: `${Q}-invoice`,
232
- children: Z.typeInvoice
233
- })]
234
- }), /* @__PURE__ */ A("div", {
235
- className: "ttw:flex ttw:items-center ttw:gap-2",
236
- children: [/* @__PURE__ */ k(m, {
237
- value: "quote",
238
- id: `${Q}-quote`
239
- }), /* @__PURE__ */ k(f, {
240
- htmlFor: `${Q}-quote`,
241
- children: Z.typeQuote
242
- })]
243
- })]
244
- }),
245
- /* @__PURE__ */ k(I, { message: F?.type })
246
- ]
113
+ className: "ttw:flex ttw:flex-row ttw:flex-wrap ttw:gap-x-12 ttw:gap-y-2",
114
+ children: G.amountRows.map((e) => /* @__PURE__ */ A(C, {
115
+ row: e,
116
+ defaultTone: G.amountTone
117
+ }, e.label))
247
118
  }),
248
- /* @__PURE__ */ A("div", {
249
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
250
- children: [
251
- /* @__PURE__ */ k(f, { children: Z.customerLabel }),
252
- W,
253
- /* @__PURE__ */ k("p", {
254
- className: "ttw:text-xs ttw:text-muted-foreground",
255
- children: Z.customerHint
256
- }),
257
- /* @__PURE__ */ k(I, { message: F?.customerId })
258
- ]
119
+ /* @__PURE__ */ j("div", {
120
+ className: "ttw:flex ttw:items-center ttw:gap-2",
121
+ children: [G.overdueLabel ? /* @__PURE__ */ j("span", {
122
+ className: "ttw:inline-flex ttw:items-center ttw:gap-1 ttw:rounded-full ttw:bg-red-100 ttw:px-2.5 ttw:py-0.5 ttw:text-xs ttw:font-medium ttw:text-red-700",
123
+ children: [/* @__PURE__ */ A(M, { className: "ttw:size-3" }), G.overdueLabel]
124
+ }) : /* @__PURE__ */ A(v, {
125
+ label: G.statusLabel,
126
+ tone: L.statusTone,
127
+ icon: Y ? /* @__PURE__ */ A(Y, { className: "ttw:size-3" }) : void 0
128
+ }), G.recurring ? /* @__PURE__ */ j(i, {
129
+ variant: "outline",
130
+ className: "ttw:gap-1 ttw:border-violet-200 ttw:bg-violet-50 ttw:text-violet-700",
131
+ children: [/* @__PURE__ */ A(P, { className: "ttw:size-3" }), W.recurringBadge]
132
+ }) : null]
259
133
  }),
260
- /* @__PURE__ */ A("div", {
261
- className: ke,
262
- children: [
263
- /* @__PURE__ */ A("div", {
264
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
265
- children: [
266
- /* @__PURE__ */ k(f, {
267
- htmlFor: `${Q}-currency`,
268
- children: Z.currencyLabel
269
- }),
270
- /* @__PURE__ */ A(h, {
271
- value: P.currency,
272
- onValueChange: (e) => K({ currency: e }),
273
- children: [/* @__PURE__ */ k(v, {
274
- id: `${Q}-currency`,
275
- children: /* @__PURE__ */ k(y, {})
276
- }), /* @__PURE__ */ k(g, { children: R.map((e) => /* @__PURE__ */ k(_, {
277
- value: e.value,
278
- children: e.label
279
- }, e.value)) })]
280
- }),
281
- /* @__PURE__ */ k(I, { message: F?.currency })
282
- ]
283
- }),
284
- $ && /* @__PURE__ */ A("div", {
285
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
286
- children: [
287
- /* @__PURE__ */ k(f, {
288
- htmlFor: `${Q}-issue-date`,
289
- children: Z.issueDateLabel
290
- }),
291
- /* @__PURE__ */ k(c, {
292
- id: `${Q}-issue-date`,
293
- type: "date",
294
- value: P.issueDate,
295
- onChange: (e) => K({ issueDate: e.target.value })
296
- }),
297
- /* @__PURE__ */ k(I, { message: F?.issueDate })
298
- ]
299
- }),
300
- Y && /* @__PURE__ */ A("div", {
301
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
302
- children: [
303
- /* @__PURE__ */ k(f, {
304
- htmlFor: `${Q}-due-date`,
305
- children: Z.dueDateLabel
306
- }),
307
- /* @__PURE__ */ k(c, {
308
- id: `${Q}-due-date`,
309
- type: "date",
310
- value: P.dueDate,
311
- onChange: (e) => K({ dueDate: e.target.value })
312
- }),
313
- /* @__PURE__ */ k(I, { message: F?.dueDate })
314
- ]
315
- })
316
- ]
134
+ /* @__PURE__ */ j("div", {
135
+ className: "ttw:flex ttw:gap-12 ttw:text-sm",
136
+ children: [/* @__PURE__ */ j("div", {
137
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
138
+ children: [/* @__PURE__ */ A("span", {
139
+ className: "ttw:text-xs ttw:text-muted-foreground",
140
+ children: W.invoiceDateCaption
141
+ }), /* @__PURE__ */ A("span", {
142
+ className: "ttw:text-foreground",
143
+ children: G.issueDateLabel
144
+ })]
145
+ }), /* @__PURE__ */ j("div", {
146
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
147
+ children: [/* @__PURE__ */ A("span", {
148
+ className: "ttw:text-xs ttw:text-muted-foreground",
149
+ children: G.dueDateCaption
150
+ }), /* @__PURE__ */ A("span", {
151
+ className: "ttw:text-foreground",
152
+ children: G.dueDateLabel
153
+ })]
154
+ })]
317
155
  }),
318
- he,
319
- ge,
320
- /* @__PURE__ */ A("div", {
321
- className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:rounded-xl ttw:border ttw:border-border ttw:p-6",
322
- children: [
323
- /* @__PURE__ */ A("div", {
324
- className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:pb-4",
325
- children: [/* @__PURE__ */ k(E, {
326
- variant: "h4",
327
- children: Z.lineItemsHeading
328
- }), /* @__PURE__ */ k(E, {
329
- variant: "body2",
330
- color: "muted",
331
- className: "ttw:font-medium",
332
- children: Z.lineItemsDescription
156
+ G.primaryActions.length > 0 ? /* @__PURE__ */ A("div", {
157
+ className: "ttw:flex ttw:items-center ttw:gap-2 ttw:border-t ttw:border-border ttw:pt-3",
158
+ children: G.primaryActions.map((e, t) => {
159
+ let n = y[e], r = t === G.primaryActions.length - 1;
160
+ return /* @__PURE__ */ j(a, {
161
+ size: "sm",
162
+ variant: r ? "default" : "outline",
163
+ onClick: () => V(e, L),
164
+ children: [/* @__PURE__ */ A(n, { className: "ttw:size-4" }), J(e)]
165
+ }, e);
166
+ })
167
+ }) : null
168
+ ]
169
+ })
170
+ }), /* @__PURE__ */ j("div", {
171
+ className: "ttw:px-6",
172
+ children: [
173
+ G.paymentHistory ? /* @__PURE__ */ j("section", {
174
+ "aria-label": W.paymentHistoryHeading,
175
+ className: "ttw:border-b ttw:py-4",
176
+ children: [/* @__PURE__ */ A("h3", {
177
+ className: "ttw:mb-3 ttw:text-sm ttw:font-medium",
178
+ children: W.paymentHistoryHeading
179
+ }), G.paymentHistory.rows.length === 0 ? /* @__PURE__ */ A("p", {
180
+ className: h("ttw:text-sm", G.paymentHistory.emptyTone === "danger" ? "ttw:text-red-600" : "ttw:text-muted-foreground"),
181
+ children: W.paymentHistoryEmpty
182
+ }) : /* @__PURE__ */ j("div", {
183
+ className: "ttw:flex ttw:flex-col",
184
+ children: [G.paymentHistory.rows.map((e) => /* @__PURE__ */ j("div", {
185
+ className: "ttw:flex ttw:justify-between ttw:border-b ttw:border-border ttw:py-2 ttw:text-sm",
186
+ children: [/* @__PURE__ */ A("span", { children: e.dateLabel }), /* @__PURE__ */ A("span", { children: e.amountLabel })]
187
+ }, e.id)), /* @__PURE__ */ j("div", {
188
+ className: "ttw:flex ttw:justify-between ttw:py-2 ttw:text-sm ttw:font-medium",
189
+ children: [/* @__PURE__ */ A("span", { children: W.paymentHistoryTotalLabel }), /* @__PURE__ */ A("span", { children: G.paymentHistory.totalLabel })]
190
+ })]
191
+ })]
192
+ }) : null,
193
+ G.customerContact.length > 0 ? /* @__PURE__ */ j("section", {
194
+ "aria-label": W.customerDetailsHeading,
195
+ className: "ttw:border-b ttw:py-4",
196
+ children: [/* @__PURE__ */ A("h3", {
197
+ className: "ttw:mb-3 ttw:text-sm ttw:font-medium",
198
+ children: W.customerDetailsHeading
199
+ }), /* @__PURE__ */ A("div", {
200
+ className: "ttw:flex ttw:flex-col",
201
+ children: G.customerContact.map((e) => /* @__PURE__ */ A(D, { ...e }, e.label))
202
+ })]
203
+ }) : null,
204
+ /* @__PURE__ */ j(e, {
205
+ type: "multiple",
206
+ defaultValue: [w],
207
+ className: "ttw:w-full",
208
+ children: [
209
+ G.recurrenceItems ? /* @__PURE__ */ j(n, {
210
+ value: "recurrence",
211
+ children: [/* @__PURE__ */ A(r, { children: W.recurrenceHeading }), /* @__PURE__ */ A(t, { children: /* @__PURE__ */ A("div", {
212
+ className: "ttw:flex ttw:flex-col",
213
+ children: G.recurrenceItems.map((e) => /* @__PURE__ */ A(D, { ...e }, e.label))
214
+ }) })]
215
+ }) : null,
216
+ /* @__PURE__ */ j(n, {
217
+ value: "billing",
218
+ children: [/* @__PURE__ */ A(r, { children: W.billingHeading }), /* @__PURE__ */ A(t, { children: /* @__PURE__ */ A("div", {
219
+ className: "ttw:flex ttw:flex-col",
220
+ children: G.billingItems.map((e) => /* @__PURE__ */ A(D, { ...e }, e.label))
221
+ }) })]
222
+ }),
223
+ /* @__PURE__ */ j(n, {
224
+ value: "line-items",
225
+ children: [/* @__PURE__ */ A(r, { children: /* @__PURE__ */ j("span", {
226
+ className: "ttw:flex ttw:items-center ttw:gap-2",
227
+ children: [W.lineItemsHeading, /* @__PURE__ */ A(i, {
228
+ variant: "secondary",
229
+ className: "ttw:rounded-full",
230
+ children: G.lineItemsCountLabel
333
231
  })]
334
- }),
335
- F?.lineItemsSummary?.length ? /* @__PURE__ */ k(e, {
336
- variant: "destructive",
337
- className: "ttw:mb-2",
338
- children: /* @__PURE__ */ k(t, { children: /* @__PURE__ */ k("ul", { children: F.lineItemsSummary.map((e) => /* @__PURE__ */ k("li", { children: e }, e)) }) })
339
- }) : null,
340
- /* @__PURE__ */ A("ul", {
341
- className: "ttw:flex ttw:flex-col ttw:gap-2.5",
342
- children: [/* @__PURE__ */ A("li", {
343
- "aria-hidden": !0,
344
- className: "ttw:flex ttw:h-5 ttw:items-center ttw:gap-2.5 ttw:text-sm ttw:leading-5 ttw:font-medium",
345
- children: [
346
- /* @__PURE__ */ k("span", {
347
- className: "ttw:inline-flex ttw:min-w-30 ttw:flex-1 ttw:whitespace-nowrap",
348
- children: Z.productLabel
349
- }),
350
- /* @__PURE__ */ k("span", {
351
- className: "ttw:w-24 ttw:min-w-24",
352
- children: Z.quantityLabel
353
- }),
354
- /* @__PURE__ */ k("span", {
355
- className: "ttw:w-20.5 ttw:min-w-20.5",
356
- children: Z.unitLabel
357
- }),
358
- /* @__PURE__ */ k("span", {
359
- className: "ttw:w-full ttw:max-w-41 ttw:min-w-29",
360
- children: Z.priceLabel
361
- }),
362
- /* @__PURE__ */ k("span", {
363
- className: "ttw:w-12 ttw:min-w-12",
364
- children: Z.taxableLabel
365
- }),
366
- P.lineItems.length > 1 && /* @__PURE__ */ k("span", { className: "ttw:w-10 ttw:min-w-10" })
367
- ]
368
- }), H ? /* @__PURE__ */ k("li", {
369
- className: "ttw:flex ttw:h-9 ttw:items-center ttw:justify-center",
370
- children: /* @__PURE__ */ k(te, { className: "ttw:size-5" })
371
- }) : P.lineItems.map((e) => /* @__PURE__ */ k(L, {
372
- formId: Q,
373
- lineItem: e,
374
- errors: F?.lineItems?.[e.id],
375
- controls: B?.[e.id],
376
- focusOnMount: e.id === V,
377
- canRemove: P.lineItems.length > 1,
378
- unitOptions: oe,
379
- currencySymbol: z,
380
- labels: Z,
381
- renderProductSelector: G,
382
- onChange: (t) => q(e.id, t),
383
- onCommit: (t) => se(e.id, t),
384
- onQuantityStep: (t) => ce(e.id, t),
385
- onManageUnits: fe,
386
- onRemove: () => me(e.id)
387
- }, e.id))]
388
- }),
389
- /* @__PURE__ */ A(n, {
390
- type: "button",
391
- variant: "ghost",
392
- className: "ttw:w-fit ttw:text-primary ttw:hover:text-primary",
393
- onClick: pe,
394
- children: [/* @__PURE__ */ k(M, { className: "ttw:size-5 ttw:text-primary" }), Z.addLineItemButton]
395
- }),
396
- /* @__PURE__ */ k(ae, {
397
- inputId: `${Q}-discount`,
398
- discountType: P.discountType,
399
- value: P.discount,
400
- error: F?.discount,
401
- currencySymbol: z,
402
- disabled: U,
403
- labels: Z,
404
- onChange: (e) => K({ discount: e }),
405
- onTypeChange: (e) => K({ discountType: e }),
406
- onFocus: le,
407
- onBlur: ue
408
- }),
409
- /* @__PURE__ */ A(i, {
410
- className: "ttw:flex-col",
411
- children: [/* @__PURE__ */ A(a, {
412
- className: "ttw:flex-row ttw:justify-end",
413
- children: [/* @__PURE__ */ k(s, {
414
- htmlFor: `${Q}-tax-rate`,
415
- className: D(F?.taxRate && "ttw:text-destructive"),
416
- children: Z.taxRateLabel
417
- }), /* @__PURE__ */ A(l, {
418
- className: "ttw:w-40 ttw:has-[>[data-align=inline-end]]:[&>input]:pr-0",
419
- children: [/* @__PURE__ */ k(d, {
420
- id: `${Q}-tax-rate`,
421
- className: "ttw:text-right",
422
- placeholder: Z.taxRatePlaceholder,
423
- type: "text",
424
- inputMode: "decimal",
425
- "aria-invalid": !!F?.taxRate || void 0,
426
- "aria-describedby": F?.taxRate ? `${Q}-tax-rate-error` : void 0,
427
- value: P.taxRate,
428
- onChange: (e) => K({ taxRate: e.target.value }),
429
- onBlur: J
430
- }), /* @__PURE__ */ k(u, {
431
- align: "inline-end",
432
- children: Z.taxRateSuffix
232
+ }) }), /* @__PURE__ */ A(t, { children: /* @__PURE__ */ j("div", {
233
+ className: "ttw:flex ttw:flex-col ttw:text-sm",
234
+ children: [L.lineItems.length === 0 ? /* @__PURE__ */ A("p", {
235
+ className: "ttw:py-3 ttw:text-muted-foreground",
236
+ children: W.noLineItems
237
+ }) : L.lineItems.map((e) => /* @__PURE__ */ j("div", {
238
+ className: "ttw:flex ttw:items-start ttw:justify-between ttw:border-b ttw:border-border ttw:py-3",
239
+ children: [/* @__PURE__ */ j("div", {
240
+ className: "ttw:flex ttw:flex-col",
241
+ children: [/* @__PURE__ */ A("span", {
242
+ className: "ttw:font-medium",
243
+ children: e.name
244
+ }), /* @__PURE__ */ j("span", {
245
+ className: "ttw:text-muted-foreground",
246
+ children: [
247
+ e.quantityLabel,
248
+ " ",
249
+ W.lineItemMultiplier,
250
+ " ",
251
+ e.unitPriceLabel,
252
+ " ",
253
+ W.lineItemEaLabel
254
+ ]
433
255
  })]
434
- })]
435
- }), F?.taxRate && /* @__PURE__ */ k(o, {
436
- id: `${Q}-tax-rate-error`,
437
- className: "ttw:text-right",
438
- children: F.taxRate
256
+ }), /* @__PURE__ */ A("span", { children: e.totalLabel })]
257
+ }, e.id)), G.lineItemTotals.length > 0 ? /* @__PURE__ */ A("div", {
258
+ className: "ttw:flex ttw:flex-col ttw:gap-1 ttw:py-3",
259
+ children: G.lineItemTotals.map((e) => /* @__PURE__ */ j("div", {
260
+ className: h("ttw:flex ttw:justify-between", e.emphasis && "ttw:font-medium"),
261
+ children: [/* @__PURE__ */ A("span", { children: e.label }), /* @__PURE__ */ A("span", { children: e.value })]
262
+ }, e.label))
263
+ }) : null]
264
+ }) })]
265
+ }),
266
+ G.notes ? /* @__PURE__ */ j(n, {
267
+ value: "notes",
268
+ children: [/* @__PURE__ */ A(r, { children: /* @__PURE__ */ j("span", {
269
+ className: "ttw:flex ttw:items-center ttw:gap-2",
270
+ children: [W.notesHeading, /* @__PURE__ */ A(i, {
271
+ variant: "secondary",
272
+ className: "ttw:rounded-full",
273
+ children: G.notes.countLabel
439
274
  })]
440
- }),
441
- /* @__PURE__ */ k(b, {}),
442
- /* @__PURE__ */ k(re, {
443
- totals: de,
444
- labels: Z
445
- })
446
- ]
447
- }),
448
- _e,
449
- /* @__PURE__ */ k(O, {
450
- idPrefix: Q,
451
- openingNote: P.openingNote,
452
- closingNote: P.closingNote,
453
- openingNoteError: F?.openingNote,
454
- closingNoteError: F?.closingNote,
455
- disabled: U,
456
- onOpeningNoteChange: (e) => K({ openingNote: e }),
457
- onClosingNoteChange: (e) => K({ closingNote: e }),
458
- labels: Z
459
- }),
460
- ve
461
- ]
462
- })]
463
- }),
464
- /* @__PURE__ */ k(w, { children: /* @__PURE__ */ A("div", {
465
- className: "ttw:flex ttw:justify-end ttw:gap-2",
466
- children: [
467
- /* @__PURE__ */ k(n, {
468
- type: "button",
469
- variant: "ghost",
470
- disabled: ye,
471
- onClick: De,
472
- children: Z.cancelButton
473
- }),
474
- X && /* @__PURE__ */ k(n, {
475
- type: "submit",
476
- form: Q,
477
- variant: "secondary",
478
- disabled: be,
479
- onClick: Te,
480
- children: X
481
- }),
482
- /* @__PURE__ */ k(n, {
483
- type: "submit",
484
- form: Q,
485
- disabled: Se,
486
- onClick: Ee,
487
- children: xe
275
+ }) }), /* @__PURE__ */ A(t, { children: /* @__PURE__ */ j("div", {
276
+ className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:text-sm",
277
+ children: [G.notes.opening ? /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("p", {
278
+ className: "ttw:mb-1 ttw:font-medium",
279
+ children: W.notesOpeningLabel
280
+ }), /* @__PURE__ */ A("p", {
281
+ className: "ttw:text-muted-foreground",
282
+ children: G.notes.opening
283
+ })] }) : null, G.notes.closing ? /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("p", {
284
+ className: "ttw:mb-1 ttw:font-medium",
285
+ children: W.notesClosingLabel
286
+ }), /* @__PURE__ */ A("p", {
287
+ className: "ttw:text-muted-foreground",
288
+ children: G.notes.closing
289
+ })] }) : null]
290
+ }) })]
291
+ }) : null,
292
+ /* @__PURE__ */ A(T, {
293
+ attachments: G.attachments,
294
+ labels: W
295
+ })
296
+ ]
488
297
  })
489
298
  ]
490
- }) })
491
- ]
299
+ })]
300
+ })] })]
492
301
  })
493
302
  });
494
303
  }
495
304
  //#endregion
496
- export { R as ReceivableFormSheet, R as default };
305
+ export { F as ReceivableDetailsPanel, F as default };