@tesouro/embedded-components-react 0.11.120 → 0.11.123

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 (119) hide show
  1. package/README.md +6 -3
  2. package/dist/index.css +32 -161
  3. package/dist/index.d.ts +40 -8
  4. package/dist/index.js +29 -28
  5. package/dist/lib/ExpenseManagementWidget.d.ts +11 -2
  6. package/dist/lib/ReceivablesWidget.d.ts +29 -6
  7. package/dist/lib/ReceivablesWidget.js +3 -1
  8. package/dist/lib/WidgetSuite.d.ts +38 -6
  9. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/ExpenseManagementWidget/ExpenseManagementWidget.js +343 -264
  10. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/ExpenseManagementWidget/labels.js +14 -0
  11. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/ExpenseManagementWidget/permissions.js +6 -3
  12. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/ExpenseManagementWidget/useExpenseTabBadgeCounts.js +34 -19
  13. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/ExpenseManagementWidget/useExpensesTransactions.js +100 -98
  14. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/TransactionDetails/TransactionDetailsActionsFeature.js +27 -24
  15. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/TransactionDetails/TransactionDetailsFeature.js +1 -0
  16. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/expenseStatus.js +2 -2
  17. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/feature/dist/index2.js +43 -44
  18. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/feature/dist/index4.js +79 -40
  19. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/ui/dist/index2.js +10 -0
  20. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/ui/dist/index3.js +47 -46
  21. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/ui/dist/index4.js +78 -84
  22. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/ui/dist/index5.js +165 -158
  23. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/ui/dist/index6.js +38 -100
  24. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/ui/dist/index7.js +77 -54
  25. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/AccordionItemCard/AccordionItemCard.js +213 -229
  26. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseStatusBadge/ExpenseStatusBadge.js +6 -8
  27. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesScreen/ExpensesScreen.js +66 -73
  28. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesTransactionsFilterBar/ExpensesTransactionsFilterBar.js +13 -13
  29. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesTransactionsTable/ExpensesTransactionsTable.js +123 -80
  30. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesTransactionsTable/labels.js +1 -0
  31. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/FileViewer.js +83 -74
  32. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/DeleteReceiptDialog/DeleteReceiptDialog.js +22 -30
  33. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/TransactionDetails.js +176 -259
  34. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/labels.js +4 -2
  35. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetailsActions/BulkProgress.js +1 -0
  36. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetailsActions/TransactionDetailsActions.js +112 -121
  37. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetailsActions/labels.js +1 -0
  38. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +3 -1
  39. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivableAttachmentsSection.js +1 -1
  40. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivableCustomerSection.js +1 -1
  41. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +342 -295
  42. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/paymentTerms.js +1 -1
  43. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/preview.js +1 -1
  44. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurrence.js +1 -1
  45. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/reminders.js +1 -1
  46. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/tabs.js +26 -0
  47. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +1 -1
  48. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +1 -1
  49. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/mocks/labels.js +1 -1
  50. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +30 -26
  51. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js +18 -2
  52. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +121 -11
  53. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +100 -11
  54. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +39 -27
  55. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +2 -205
  56. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +11 -52
  57. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +11 -210
  58. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +27 -159
  59. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +203 -14
  60. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +51 -22
  61. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +210 -2
  62. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +154 -111
  63. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +15 -3
  64. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +21 -195
  65. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +3 -2
  66. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +116 -53
  67. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +3 -22
  68. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +197 -8
  69. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +2 -78
  70. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +53 -39
  71. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +20 -17
  72. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +8 -41
  73. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +73 -25
  74. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +36 -17
  75. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +17 -9
  76. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +39 -34
  77. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +29 -14
  78. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +18 -24
  79. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +8 -85
  80. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +33 -490
  81. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +15 -2
  82. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +22 -42
  83. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +82 -65
  84. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +475 -426
  85. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +2 -226
  86. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +46 -21
  87. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +69 -5
  88. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +445 -0
  89. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +208 -246
  90. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +22 -2
  91. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +5 -129
  92. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +247 -222
  93. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +1 -2
  94. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +125 -242
  95. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +23 -56
  96. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +229 -209
  97. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +3 -47
  98. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js +248 -0
  99. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index59.js +60 -0
  100. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +2 -17
  101. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index60.js +194 -0
  102. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index61.js +47 -0
  103. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +53 -117
  104. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js +9 -99
  105. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +3 -40
  106. package/dist/libs/tesouro-embedded-components-react/shared/expense-requirements/feature/dist/lib/ExpenseRequirementsWidget.js +41 -32
  107. package/dist/libs/tesouro-embedded-components-react/shared/expense-requirements/ui/dist/index3.js +43 -53
  108. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  109. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +3 -1
  110. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/CopyAddress/CopyAddress.js +55 -0
  111. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/UploadTray/UploadTray.js +84 -0
  112. package/dist/libs/tesouro-embedded-components-react/upload-receipt-widget/feature/dist/lib/UploadReceiptWidget.js +126 -73
  113. package/dist/libs/tesouro-embedded-components-react/upload-receipt-widget/ui/dist/index2.js +14 -1
  114. package/dist/libs/tesouro-embedded-components-react/upload-receipt-widget/ui/dist/index3.js +9 -8
  115. package/dist/libs/tesouro-embedded-components-react/upload-receipt-widget/ui/dist/index4.js +75 -128
  116. package/dist/packages/shared-ui-shadcn/dist/index.js +1399 -1302
  117. package/package.json +1 -1
  118. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseStatusBadge/badgeTones.js +0 -9
  119. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +0 -27
@@ -1,198 +1,24 @@
1
- import { Avatar as e, AvatarFallback as t, Button as n, Field as r, FieldContent as i, FieldDescription as a, FieldError as o, FieldLabel as s, Input as c, Separator as l, Typography as u, cn as d } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { RECEIVABLE_CUSTOMER_SECTION_LABELS_EN as f } from "./index12.js";
3
- import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
4
- import { ChevronDownIcon as g, Loader2Icon as _, PlusIcon as v, SearchIcon as y } from "lucide-react";
1
+ import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { OptionRow as t } from "./index22.js";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ import { CalendarIcon as i } from "lucide-react";
5
5
  // ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js
6
- function b({ idPrefix: b, card: x, picker: S, create: C, disabled: w, inputRef: T, onInputValueChange: E, onInputFocus: D, onInputBlur: O, onListToggle: k, onKey: A, onOptionHighlight: j, onOptionSelect: M, onEmailChange: N, onEmailBlur: P, onAddDetailsClick: F, onViewDetailsClick: I, onClearClick: L, labels: R }) {
7
- let z = {
8
- ...f,
9
- ...R
10
- }, B = `${b}-customer-name`, V = `${b}-customer-name-description`, H = `${b}-customer-name-error`, U = `${b}-customer-card-error`, W = `${b}-customer-email`, G = `${b}-customer-email-error`, K = S.open ? S.options.find((e) => e.value === S.highlightedValue) : void 0;
11
- return /* @__PURE__ */ h("div", {
12
- className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:rounded-xl ttw:border ttw:border-border ttw:p-6",
13
- children: [/* @__PURE__ */ h("div", {
14
- className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:pb-4",
15
- children: [/* @__PURE__ */ m(u, {
16
- variant: "h4",
17
- children: z.customerHeading
18
- }), /* @__PURE__ */ m(u, {
19
- variant: "body2",
20
- color: "muted",
21
- className: "ttw:font-medium",
22
- children: z.customerDescription
6
+ function a({ selection: a, labels: o }) {
7
+ return a?.kind === "receiptDue" ? /* @__PURE__ */ n("span", {
8
+ className: "ttw:truncate",
9
+ children: o.paymentTermsReceiptDue
10
+ }) : a?.kind === "customDate" ? /* @__PURE__ */ r("span", {
11
+ className: "ttw:flex ttw:w-full ttw:min-w-0 ttw:items-center ttw:justify-between ttw:gap-2",
12
+ children: [/* @__PURE__ */ r("span", {
13
+ className: "ttw:flex ttw:min-w-0 ttw:items-center ttw:gap-1.5",
14
+ children: [/* @__PURE__ */ n(i, { className: e("ttw:size-4 ttw:shrink-0", !a.hasDate && "ttw:text-muted-foreground") }), /* @__PURE__ */ n("span", {
15
+ className: e("ttw:truncate", !a.hasDate && "ttw:text-muted-foreground"),
16
+ children: a.dateLabel
23
17
  })]
24
- }), x ? /* @__PURE__ */ h("div", {
25
- className: "ttw:flex ttw:flex-col ttw:gap-2",
26
- children: [/* @__PURE__ */ h("div", {
27
- role: "group",
28
- "aria-label": x.name,
29
- "aria-describedby": x.error ? U : void 0,
30
- className: d("ttw:flex ttw:items-center ttw:justify-between ttw:gap-2 ttw:rounded-xl ttw:border ttw:border-border ttw:p-3", x.error && "ttw:border-destructive"),
31
- children: [/* @__PURE__ */ h("div", {
32
- className: "ttw:flex ttw:min-w-0 ttw:items-center ttw:gap-5",
33
- children: [/* @__PURE__ */ m(e, {
34
- className: "ttw:size-16",
35
- "aria-hidden": "true",
36
- children: /* @__PURE__ */ m(t, {
37
- className: "ttw:text-sm ttw:font-normal",
38
- children: x.initial
39
- })
40
- }), /* @__PURE__ */ h("div", {
41
- className: "ttw:flex ttw:min-w-0 ttw:flex-col ttw:gap-1",
42
- children: [/* @__PURE__ */ m(u, {
43
- variant: "body1",
44
- className: "ttw:font-medium",
45
- children: x.name
46
- }), /* @__PURE__ */ m(u, {
47
- variant: "body2",
48
- color: "muted",
49
- children: x.email
50
- })]
51
- })]
52
- }), /* @__PURE__ */ h("div", {
53
- className: "ttw:flex ttw:items-center",
54
- children: [I ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(n, {
55
- type: "button",
56
- variant: "ghost",
57
- className: "ttw:text-primary ttw:hover:text-primary",
58
- disabled: w,
59
- onClick: I,
60
- children: z.viewCustomerDetailsButton
61
- }), /* @__PURE__ */ m(l, {
62
- orientation: "vertical",
63
- className: "ttw:h-6!"
64
- })] }) : null, /* @__PURE__ */ m(n, {
65
- type: "button",
66
- variant: "ghost",
67
- className: "ttw:text-primary ttw:hover:text-primary",
68
- disabled: w,
69
- onClick: L,
70
- children: z.clearCustomerButton
71
- })]
72
- })]
73
- }), x.error ? /* @__PURE__ */ m(o, {
74
- id: U,
75
- children: x.error
76
- }) : null]
77
- }) : /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(r, { children: /* @__PURE__ */ h(i, { children: [
78
- /* @__PURE__ */ m(s, {
79
- htmlFor: B,
80
- children: z.customerNameLabel
81
- }),
82
- /* @__PURE__ */ h("div", {
83
- className: "ttw:relative ttw:w-full",
84
- children: [/* @__PURE__ */ h("div", {
85
- className: d("ttw:flex ttw:h-9 ttw:w-full ttw:min-w-0 ttw:items-center ttw:rounded-md ttw:border ttw:border-input ttw:shadow-xs ttw:transition-[color,box-shadow] ttw:has-[input:focus-visible]:border-ring ttw:has-[input:focus-visible]:ring-[3px] ttw:has-[input:focus-visible]:ring-ring/50 ttw:has-[[aria-invalid=true]]:border-destructive", w && "ttw:opacity-50"),
86
- children: [
87
- S.isLoading ? /* @__PURE__ */ m(_, { className: "ttw:pointer-events-none ttw:ml-3 ttw:size-4 ttw:shrink-0 ttw:animate-spin ttw:text-muted-foreground" }) : /* @__PURE__ */ m(y, { className: "ttw:pointer-events-none ttw:ml-3 ttw:size-4 ttw:shrink-0 ttw:text-muted-foreground" }),
88
- /* @__PURE__ */ m("input", {
89
- id: B,
90
- ref: T,
91
- role: "combobox",
92
- "aria-autocomplete": "list",
93
- "aria-expanded": S.open,
94
- "aria-controls": S.listId,
95
- "aria-activedescendant": K?.id,
96
- "aria-invalid": !!S.error || void 0,
97
- "aria-describedby": S.error ? `${V} ${H}` : V,
98
- autoComplete: "off",
99
- disabled: w,
100
- placeholder: S.placeholder,
101
- className: "ttw:h-full ttw:min-w-0 ttw:flex-1 ttw:bg-transparent ttw:pr-2 ttw:pl-2 ttw:text-base ttw:outline-none ttw:placeholder:text-muted-foreground ttw:disabled:cursor-not-allowed ttw:md:text-sm",
102
- value: S.inputValue,
103
- onFocus: D,
104
- onClick: D,
105
- onBlur: O,
106
- onChange: (e) => E(e.target.value),
107
- onKeyDown: (e) => {
108
- e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), A(e.key === "ArrowDown" ? "next" : "previous")) : e.key === "Enter" ? (e.preventDefault(), A("enter")) : e.key === "Tab" && S.open ? A("tab") : e.key === "Escape" && S.open && (e.stopPropagation(), A("escape"));
109
- }
110
- }),
111
- /* @__PURE__ */ m("button", {
112
- type: "button",
113
- tabIndex: -1,
114
- "aria-label": z.customerListToggleButton,
115
- "aria-controls": S.listId,
116
- "aria-expanded": S.open,
117
- disabled: w,
118
- className: "ttw:mr-[0.3rem] ttw:flex ttw:size-6 ttw:shrink-0 ttw:cursor-pointer ttw:items-center ttw:justify-center ttw:rounded-[calc(var(--radius)-5px)] ttw:text-muted-foreground ttw:transition-all ttw:hover:bg-accent ttw:hover:text-accent-foreground ttw:disabled:pointer-events-none",
119
- onMouseDown: (e) => e.preventDefault(),
120
- onClick: k,
121
- children: /* @__PURE__ */ m(g, { className: "ttw:pointer-events-none ttw:size-4" })
122
- })
123
- ]
124
- }), S.open && !w ? /* @__PURE__ */ m("div", {
125
- role: "presentation",
126
- className: d("ttw:absolute ttw:top-full ttw:left-0 ttw:z-50 ttw:mt-1.5 ttw:w-full ttw:overflow-hidden ttw:rounded-md ttw:bg-popover ttw:text-popover-foreground ttw:shadow-md ttw:ring-1 ttw:ring-foreground/10", !S.options.length && "ttw:pointer-events-none"),
127
- onMouseDown: S.options.length ? (e) => e.preventDefault() : void 0,
128
- children: /* @__PURE__ */ h("ul", {
129
- id: S.listId,
130
- role: "listbox",
131
- "aria-labelledby": B,
132
- className: "ttw:max-h-87 ttw:scroll-py-1 ttw:overflow-y-auto ttw:p-1",
133
- children: [
134
- S.options.map((e) => /* @__PURE__ */ h("li", {
135
- id: e.id,
136
- role: "option",
137
- "aria-selected": e === K,
138
- className: d("ttw:relative ttw:flex ttw:w-full ttw:cursor-default ttw:items-center ttw:justify-between ttw:gap-2 ttw:rounded-sm ttw:py-1.5 ttw:pr-8 ttw:pl-2 ttw:text-sm ttw:select-none", e === K && "ttw:bg-accent ttw:text-accent-foreground"),
139
- onMouseEnter: () => j(e.value),
140
- onMouseDown: () => M(e.value),
141
- children: [/* @__PURE__ */ m("span", {
142
- className: "ttw:min-w-0 ttw:truncate",
143
- children: e.name
144
- }), /* @__PURE__ */ m("span", {
145
- className: "ttw:min-w-0 ttw:truncate ttw:text-muted-foreground",
146
- children: e.email
147
- })]
148
- }, e.value)),
149
- S.options.length ? null : /* @__PURE__ */ m("li", {
150
- className: "ttw:py-2 ttw:text-center ttw:text-sm ttw:text-muted-foreground",
151
- children: S.emptyText
152
- }),
153
- S.options.length && S.moreText ? /* @__PURE__ */ m("li", {
154
- className: "ttw:py-2 ttw:text-center ttw:text-sm ttw:text-muted-foreground",
155
- children: S.moreText
156
- }) : null
157
- ]
158
- })
159
- }) : null]
160
- }),
161
- /* @__PURE__ */ m(a, {
162
- id: V,
163
- children: S.description
164
- }),
165
- S.error ? /* @__PURE__ */ m(o, {
166
- id: H,
167
- children: S.error
168
- }) : null
169
- ] }) }), C ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(r, { children: /* @__PURE__ */ h(i, { children: [
170
- /* @__PURE__ */ m(s, {
171
- htmlFor: W,
172
- children: z.customerEmailLabel
173
- }),
174
- /* @__PURE__ */ m(c, {
175
- id: W,
176
- type: "email",
177
- disabled: w,
178
- "aria-invalid": !!C.emailError || void 0,
179
- "aria-describedby": C.emailError ? G : void 0,
180
- value: C.email,
181
- onChange: (e) => N(e.target.value),
182
- onBlur: P
183
- }),
184
- C.emailError ? /* @__PURE__ */ m(o, {
185
- id: G,
186
- children: C.emailError
187
- }) : null
188
- ] }) }), /* @__PURE__ */ h(n, {
189
- type: "button",
190
- variant: "ghost",
191
- disabled: w,
192
- className: "ttw:w-fit ttw:text-primary ttw:hover:text-primary",
193
- onClick: F,
194
- children: [/* @__PURE__ */ m(v, {}), z.addCustomerDetailsButton]
195
- })] }) : null] })]
196
- });
18
+ }), /* @__PURE__ */ n("span", {
19
+ className: "ttw:shrink-0 ttw:text-xs ttw:text-muted-foreground",
20
+ children: o.paymentTermsCustomDate
21
+ })]
22
+ }) : a?.kind === "term" ? /* @__PURE__ */ n(t, { option: a.option }) : null;
197
23
  }
198
- export { b as ReceivableCustomerSection, b as default };
24
+ export { a as SelectionValue };
@@ -1,2 +1,3 @@
1
- import "./index12.js";
2
- import "./index23.js";
1
+ // ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js
2
+ var e = "receipt_due", t = "custom";
3
+ export { t as RECEIVABLE_PAYMENT_TERMS_CUSTOM_DATE, e as RECEIVABLE_PAYMENT_TERMS_RECEIPT_DUE };
@@ -1,54 +1,117 @@
1
- import { Ban as e, CalendarX2 as t, Check as n, ChevronsRight as r, CircleCheck as i, CircleOff as a, CircleX as o, ClipboardCheck as s, Clock as c, CopyPlus as l, FileCheck as u, Mail as d, Pause as f, PenTool as p, Pencil as m, Play as h, Send as g, Trash2 as _ } from "lucide-react";
1
+ import { Field as e, FieldContent as t, FieldDescription as n, FieldError as r, FieldLabel as i, Input as a, Popover as o, PopoverAnchor as s, PopoverContent as c, Select as l, SelectContent as u, SelectItem as d, SelectSeparator as f, SelectTrigger as p, SelectValue as m, Skeleton as h, Typography as g } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { RECEIVABLE_BILLING_SECTION_LABELS_EN as _ } from "./index15.js";
3
+ import { RECEIVABLE_PAYMENT_TERMS_RECEIPT_DUE as v } from "./index24.js";
4
+ import { OptionRow as y } from "./index22.js";
5
+ import { SelectionValue as b } from "./index23.js";
6
+ import { jsx as x, jsxs as S } from "react/jsx-runtime";
2
7
  // ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js
3
- var v = {
4
- edit: "editButton",
5
- issue: "issueButton",
6
- issueAndSend: "issueAndSendButton",
7
- recordPayment: "recordPaymentButton",
8
- send: "sendButton",
9
- accept: "acceptButton",
10
- decline: "declineButton",
11
- markPaid: "markPaidButton",
12
- markUncollectible: "markUncollectibleButton",
13
- cancel: "cancelButton",
14
- clone: "cloneButton",
15
- delete: "deleteButton",
16
- pauseRecurrence: "pauseRecurrenceButton",
17
- resumeRecurrence: "resumeRecurrenceButton",
18
- cancelRecurrence: "cancelRecurrenceButton"
19
- }, y = {
20
- edit: m,
21
- issue: u,
22
- issueAndSend: g,
23
- recordPayment: s,
24
- send: d,
25
- accept: i,
26
- decline: o,
27
- markPaid: i,
28
- markUncollectible: a,
29
- cancel: e,
30
- clone: l,
31
- delete: _,
32
- pauseRecurrence: f,
33
- resumeRecurrence: h,
34
- cancelRecurrence: t
35
- }, b = {
36
- draft: p,
37
- issuing: c,
38
- issued: c,
39
- partially_paid: c,
40
- paid: n,
41
- overdue: c,
42
- canceled: e
43
- }, x = {
44
- forward: r,
45
- pause: f,
46
- ban: e,
47
- check: n
48
- }, S = {
49
- default: "ttw:text-foreground",
50
- danger: "ttw:text-red-600",
51
- success: "ttw:text-emerald-600",
52
- muted: "ttw:text-muted-foreground"
53
- }, C = "ttw:group ttw:cursor-pointer ttw:hover:no-underline", w = "ttw:translate-y-0.5", T = "ttw:border-border", E = "ttw:rounded-full ttw:bg-muted ttw:text-muted-foreground", D = "ttw:bg-primary ttw:text-primary-foreground", O = "ttw:bg-primary ttw:fill-primary", k = "ttw:bg-muted ttw:text-muted-foreground ttw:hover:bg-accent", A = (e) => e.preventDefault();
54
- export { y as ACTION_ICON, v as ACTION_LABEL_KEY, x as SERIES_STATUS_ICON, b as STATUS_ICON, S as amountValueToneClass, k as headerIconButtonClass, O as headerTooltipArrowClass, D as headerTooltipClass, A as preventTooltipFocusOpen, w as sectionChevronClass, E as sectionCountBadgeClass, T as sectionItemClass, C as sectionTriggerClass };
8
+ function C({ idPrefix: C, paymentTerms: w, paymentTermsError: T, disabled: E, onPaymentTermsChange: D, onCustomDatePickerOpenChange: O, customDateCalendar: k, purchaseOrder: A, onPurchaseOrderChange: j, recurrenceSection: M, remindersSection: N, labels: P }) {
9
+ let F = {
10
+ ..._,
11
+ ...P
12
+ }, I = `${C}-payment-terms`, L = `${C}-purchase-order`, R = () => {
13
+ window.setTimeout(() => O(!0), 0);
14
+ };
15
+ return /* @__PURE__ */ S("div", {
16
+ className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:rounded-xl ttw:border ttw:border-border ttw:p-6",
17
+ children: [/* @__PURE__ */ S("div", {
18
+ className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:pb-4",
19
+ children: [/* @__PURE__ */ x(g, {
20
+ variant: "h4",
21
+ children: F.billingHeading
22
+ }), /* @__PURE__ */ x(g, {
23
+ variant: "body2",
24
+ color: "muted",
25
+ className: "ttw:font-medium",
26
+ children: F.billingDescription
27
+ })]
28
+ }), /* @__PURE__ */ S("div", {
29
+ className: "ttw:flex ttw:flex-col ttw:gap-6",
30
+ children: [
31
+ M,
32
+ /* @__PURE__ */ S("div", {
33
+ className: "ttw:flex ttw:w-full ttw:items-start ttw:gap-2.5",
34
+ children: [w.kind === "loading" ? /* @__PURE__ */ x(h, { className: "ttw:h-9 ttw:w-full" }) : /* @__PURE__ */ x(e, { children: /* @__PURE__ */ S(t, { children: [
35
+ /* @__PURE__ */ x(i, {
36
+ htmlFor: I,
37
+ children: F.paymentTermsLabel
38
+ }),
39
+ /* @__PURE__ */ S(o, {
40
+ open: w.customDatePicker.open,
41
+ onOpenChange: O,
42
+ children: [/* @__PURE__ */ S(l, {
43
+ disabled: E,
44
+ value: w.value,
45
+ onValueChange: (e) => {
46
+ D(e), e === "custom" && R();
47
+ },
48
+ children: [/* @__PURE__ */ x(s, {
49
+ className: "ttw:w-full",
50
+ children: /* @__PURE__ */ x(p, {
51
+ id: I,
52
+ className: "ttw:w-full",
53
+ "aria-invalid": !!T,
54
+ children: /* @__PURE__ */ x(m, {
55
+ placeholder: F.paymentTermsPlaceholder,
56
+ children: /* @__PURE__ */ x(b, {
57
+ selection: w.selection,
58
+ labels: F
59
+ })
60
+ })
61
+ })
62
+ }), /* @__PURE__ */ S(u, { children: [
63
+ /* @__PURE__ */ x(d, {
64
+ value: v,
65
+ children: F.paymentTermsReceiptDue
66
+ }),
67
+ w.showCustomDate && /* @__PURE__ */ x(d, {
68
+ value: "custom",
69
+ onPointerUp: R,
70
+ onClick: R,
71
+ onKeyDown: (e) => {
72
+ (e.key === "Enter" || e.key === " ") && R();
73
+ },
74
+ children: F.paymentTermsCustomDate
75
+ }),
76
+ /* @__PURE__ */ x(f, {}),
77
+ w.options.map((e) => /* @__PURE__ */ x(d, {
78
+ value: e.value,
79
+ children: /* @__PURE__ */ x(y, { option: e })
80
+ }, e.value))
81
+ ] })]
82
+ }), /* @__PURE__ */ x(c, {
83
+ className: "ttw:w-auto ttw:overflow-hidden ttw:p-0",
84
+ align: "start",
85
+ onFocusOutside: (e) => e.preventDefault(),
86
+ children: k
87
+ })]
88
+ }),
89
+ w.description && /* @__PURE__ */ x(n, { children: w.description }),
90
+ /* @__PURE__ */ x(r, { errors: T ? [{ message: T }] : [] })
91
+ ] }) }), A && /* @__PURE__ */ x(e, { children: /* @__PURE__ */ S(t, { children: [
92
+ /* @__PURE__ */ S(i, {
93
+ htmlFor: L,
94
+ className: "ttw:text-nowrap",
95
+ children: [F.purchaseOrderLabel, /* @__PURE__ */ x(g, {
96
+ variant: "body2",
97
+ color: "muted",
98
+ className: "ttw:leading-snug",
99
+ children: F.purchaseOrderOptional
100
+ })]
101
+ }),
102
+ /* @__PURE__ */ x(a, {
103
+ id: L,
104
+ value: A.value,
105
+ disabled: E,
106
+ "aria-invalid": !!A.error,
107
+ onChange: (e) => j?.(e.target.value)
108
+ }),
109
+ /* @__PURE__ */ x(r, { errors: A.error ? [{ message: A.error }] : [] })
110
+ ] }) })]
111
+ }),
112
+ N
113
+ ]
114
+ })]
115
+ });
116
+ }
117
+ export { C as ReceivableBillingSection, C as default };
@@ -1,22 +1,3 @@
1
- import { Typography as e, cn as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { amountValueToneClass as n } from "./index25.js";
3
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
4
- // ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js
5
- function a({ row: a, defaultTone: o }) {
6
- let s = a.tone ?? (a.emphasis ? o : "default");
7
- return /* @__PURE__ */ i("div", {
8
- className: "ttw:flex ttw:flex-col ttw:gap-0.5",
9
- children: [/* @__PURE__ */ r(e, {
10
- variant: "caption",
11
- color: "muted",
12
- className: "ttw:font-medium",
13
- children: a.label
14
- }), /* @__PURE__ */ r(e, {
15
- component: "span",
16
- variant: a.emphasis ? "h3" : "body1",
17
- className: t(!a.emphasis && "ttw:font-medium", n[s]),
18
- children: a.value
19
- })]
20
- });
21
- }
22
- export { a as AmountCell };
1
+ import "./index15.js";
2
+ import "./index24.js";
3
+ import "./index25.js";
@@ -1,9 +1,198 @@
1
+ import { Avatar as e, AvatarFallback as t, Button as n, Field as r, FieldContent as i, FieldDescription as a, FieldError as o, FieldLabel as s, Input as c, Separator as l, Typography as u, cn as d } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { RECEIVABLE_CUSTOMER_SECTION_LABELS_EN as f } from "./index16.js";
3
+ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
4
+ import { ChevronDownIcon as g, Loader2Icon as _, PlusIcon as v, SearchIcon as y } from "lucide-react";
1
5
  // ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js
2
- var e = {
3
- billing: "billing",
4
- lineItems: "line-items",
5
- notes: "notes",
6
- attachments: "attachments",
7
- auditHistory: "audit-history"
8
- };
9
- export { e as RECEIVABLE_DETAILS_SECTION };
6
+ function b({ idPrefix: b, card: x, picker: S, create: C, disabled: w, inputRef: T, onInputValueChange: E, onInputFocus: D, onInputBlur: O, onListToggle: k, onKey: A, onOptionHighlight: j, onOptionSelect: M, onEmailChange: N, onEmailBlur: P, onAddDetailsClick: F, onViewDetailsClick: I, onClearClick: L, labels: R }) {
7
+ let z = {
8
+ ...f,
9
+ ...R
10
+ }, B = `${b}-customer-name`, V = `${b}-customer-name-description`, H = `${b}-customer-name-error`, U = `${b}-customer-card-error`, W = `${b}-customer-email`, G = `${b}-customer-email-error`, K = S.open ? S.options.find((e) => e.value === S.highlightedValue) : void 0;
11
+ return /* @__PURE__ */ h("div", {
12
+ className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:rounded-xl ttw:border ttw:border-border ttw:p-6",
13
+ children: [/* @__PURE__ */ h("div", {
14
+ className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:pb-4",
15
+ children: [/* @__PURE__ */ m(u, {
16
+ variant: "h4",
17
+ children: z.customerHeading
18
+ }), /* @__PURE__ */ m(u, {
19
+ variant: "body2",
20
+ color: "muted",
21
+ className: "ttw:font-medium",
22
+ children: z.customerDescription
23
+ })]
24
+ }), x ? /* @__PURE__ */ h("div", {
25
+ className: "ttw:flex ttw:flex-col ttw:gap-2",
26
+ children: [/* @__PURE__ */ h("div", {
27
+ role: "group",
28
+ "aria-label": x.name,
29
+ "aria-describedby": x.error ? U : void 0,
30
+ className: d("ttw:flex ttw:items-center ttw:justify-between ttw:gap-2 ttw:rounded-xl ttw:border ttw:border-border ttw:p-3", x.error && "ttw:border-destructive"),
31
+ children: [/* @__PURE__ */ h("div", {
32
+ className: "ttw:flex ttw:min-w-0 ttw:items-center ttw:gap-5",
33
+ children: [/* @__PURE__ */ m(e, {
34
+ className: "ttw:size-16",
35
+ "aria-hidden": "true",
36
+ children: /* @__PURE__ */ m(t, {
37
+ className: "ttw:text-sm ttw:font-normal",
38
+ children: x.initial
39
+ })
40
+ }), /* @__PURE__ */ h("div", {
41
+ className: "ttw:flex ttw:min-w-0 ttw:flex-col ttw:gap-1",
42
+ children: [/* @__PURE__ */ m(u, {
43
+ variant: "body1",
44
+ className: "ttw:font-medium",
45
+ children: x.name
46
+ }), /* @__PURE__ */ m(u, {
47
+ variant: "body2",
48
+ color: "muted",
49
+ children: x.email
50
+ })]
51
+ })]
52
+ }), /* @__PURE__ */ h("div", {
53
+ className: "ttw:flex ttw:items-center",
54
+ children: [I ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(n, {
55
+ type: "button",
56
+ variant: "ghost",
57
+ className: "ttw:text-primary ttw:hover:text-primary",
58
+ disabled: w,
59
+ onClick: I,
60
+ children: z.viewCustomerDetailsButton
61
+ }), /* @__PURE__ */ m(l, {
62
+ orientation: "vertical",
63
+ className: "ttw:h-6!"
64
+ })] }) : null, /* @__PURE__ */ m(n, {
65
+ type: "button",
66
+ variant: "ghost",
67
+ className: "ttw:text-primary ttw:hover:text-primary",
68
+ disabled: w,
69
+ onClick: L,
70
+ children: z.clearCustomerButton
71
+ })]
72
+ })]
73
+ }), x.error ? /* @__PURE__ */ m(o, {
74
+ id: U,
75
+ children: x.error
76
+ }) : null]
77
+ }) : /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(r, { children: /* @__PURE__ */ h(i, { children: [
78
+ /* @__PURE__ */ m(s, {
79
+ htmlFor: B,
80
+ children: z.customerNameLabel
81
+ }),
82
+ /* @__PURE__ */ h("div", {
83
+ className: "ttw:relative ttw:w-full",
84
+ children: [/* @__PURE__ */ h("div", {
85
+ className: d("ttw:flex ttw:h-9 ttw:w-full ttw:min-w-0 ttw:items-center ttw:rounded-md ttw:border ttw:border-input ttw:shadow-xs ttw:transition-[color,box-shadow] ttw:has-[input:focus-visible]:border-ring ttw:has-[input:focus-visible]:ring-[3px] ttw:has-[input:focus-visible]:ring-ring/50 ttw:has-[[aria-invalid=true]]:border-destructive", w && "ttw:opacity-50"),
86
+ children: [
87
+ S.isLoading ? /* @__PURE__ */ m(_, { className: "ttw:pointer-events-none ttw:ml-3 ttw:size-4 ttw:shrink-0 ttw:animate-spin ttw:text-muted-foreground" }) : /* @__PURE__ */ m(y, { className: "ttw:pointer-events-none ttw:ml-3 ttw:size-4 ttw:shrink-0 ttw:text-muted-foreground" }),
88
+ /* @__PURE__ */ m("input", {
89
+ id: B,
90
+ ref: T,
91
+ role: "combobox",
92
+ "aria-autocomplete": "list",
93
+ "aria-expanded": S.open,
94
+ "aria-controls": S.listId,
95
+ "aria-activedescendant": K?.id,
96
+ "aria-invalid": !!S.error || void 0,
97
+ "aria-describedby": S.error ? `${V} ${H}` : V,
98
+ autoComplete: "off",
99
+ disabled: w,
100
+ placeholder: S.placeholder,
101
+ className: "ttw:h-full ttw:min-w-0 ttw:flex-1 ttw:bg-transparent ttw:pr-2 ttw:pl-2 ttw:text-base ttw:outline-none ttw:placeholder:text-muted-foreground ttw:disabled:cursor-not-allowed ttw:md:text-sm",
102
+ value: S.inputValue,
103
+ onFocus: D,
104
+ onClick: D,
105
+ onBlur: O,
106
+ onChange: (e) => E(e.target.value),
107
+ onKeyDown: (e) => {
108
+ e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), A(e.key === "ArrowDown" ? "next" : "previous")) : e.key === "Enter" ? (e.preventDefault(), A("enter")) : e.key === "Tab" && S.open ? A("tab") : e.key === "Escape" && S.open && (e.stopPropagation(), A("escape"));
109
+ }
110
+ }),
111
+ /* @__PURE__ */ m("button", {
112
+ type: "button",
113
+ tabIndex: -1,
114
+ "aria-label": z.customerListToggleButton,
115
+ "aria-controls": S.listId,
116
+ "aria-expanded": S.open,
117
+ disabled: w,
118
+ className: "ttw:mr-[0.3rem] ttw:flex ttw:size-6 ttw:shrink-0 ttw:cursor-pointer ttw:items-center ttw:justify-center ttw:rounded-[calc(var(--radius)-5px)] ttw:text-muted-foreground ttw:transition-all ttw:hover:bg-accent ttw:hover:text-accent-foreground ttw:disabled:pointer-events-none",
119
+ onMouseDown: (e) => e.preventDefault(),
120
+ onClick: k,
121
+ children: /* @__PURE__ */ m(g, { className: "ttw:pointer-events-none ttw:size-4" })
122
+ })
123
+ ]
124
+ }), S.open && !w ? /* @__PURE__ */ m("div", {
125
+ role: "presentation",
126
+ className: d("ttw:absolute ttw:top-full ttw:left-0 ttw:z-50 ttw:mt-1.5 ttw:w-full ttw:overflow-hidden ttw:rounded-md ttw:bg-popover ttw:text-popover-foreground ttw:shadow-md ttw:ring-1 ttw:ring-foreground/10", !S.options.length && "ttw:pointer-events-none"),
127
+ onMouseDown: S.options.length ? (e) => e.preventDefault() : void 0,
128
+ children: /* @__PURE__ */ h("ul", {
129
+ id: S.listId,
130
+ role: "listbox",
131
+ "aria-labelledby": B,
132
+ className: "ttw:max-h-87 ttw:scroll-py-1 ttw:overflow-y-auto ttw:p-1",
133
+ children: [
134
+ S.options.map((e) => /* @__PURE__ */ h("li", {
135
+ id: e.id,
136
+ role: "option",
137
+ "aria-selected": e === K,
138
+ className: d("ttw:relative ttw:flex ttw:w-full ttw:cursor-default ttw:items-center ttw:justify-between ttw:gap-2 ttw:rounded-sm ttw:py-1.5 ttw:pr-8 ttw:pl-2 ttw:text-sm ttw:select-none", e === K && "ttw:bg-accent ttw:text-accent-foreground"),
139
+ onMouseEnter: () => j(e.value),
140
+ onMouseDown: () => M(e.value),
141
+ children: [/* @__PURE__ */ m("span", {
142
+ className: "ttw:min-w-0 ttw:truncate",
143
+ children: e.name
144
+ }), /* @__PURE__ */ m("span", {
145
+ className: "ttw:min-w-0 ttw:truncate ttw:text-muted-foreground",
146
+ children: e.email
147
+ })]
148
+ }, e.value)),
149
+ S.options.length ? null : /* @__PURE__ */ m("li", {
150
+ className: "ttw:py-2 ttw:text-center ttw:text-sm ttw:text-muted-foreground",
151
+ children: S.emptyText
152
+ }),
153
+ S.options.length && S.moreText ? /* @__PURE__ */ m("li", {
154
+ className: "ttw:py-2 ttw:text-center ttw:text-sm ttw:text-muted-foreground",
155
+ children: S.moreText
156
+ }) : null
157
+ ]
158
+ })
159
+ }) : null]
160
+ }),
161
+ /* @__PURE__ */ m(a, {
162
+ id: V,
163
+ children: S.description
164
+ }),
165
+ S.error ? /* @__PURE__ */ m(o, {
166
+ id: H,
167
+ children: S.error
168
+ }) : null
169
+ ] }) }), C ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(r, { children: /* @__PURE__ */ h(i, { children: [
170
+ /* @__PURE__ */ m(s, {
171
+ htmlFor: W,
172
+ children: z.customerEmailLabel
173
+ }),
174
+ /* @__PURE__ */ m(c, {
175
+ id: W,
176
+ type: "email",
177
+ disabled: w,
178
+ "aria-invalid": !!C.emailError || void 0,
179
+ "aria-describedby": C.emailError ? G : void 0,
180
+ value: C.email,
181
+ onChange: (e) => N(e.target.value),
182
+ onBlur: P
183
+ }),
184
+ C.emailError ? /* @__PURE__ */ m(o, {
185
+ id: G,
186
+ children: C.emailError
187
+ }) : null
188
+ ] }) }), /* @__PURE__ */ h(n, {
189
+ type: "button",
190
+ variant: "ghost",
191
+ disabled: w,
192
+ className: "ttw:w-fit ttw:text-primary ttw:hover:text-primary",
193
+ onClick: F,
194
+ children: [/* @__PURE__ */ m(v, {}), z.addCustomerDetailsButton]
195
+ })] }) : null] })]
196
+ });
197
+ }
198
+ export { b as ReceivableCustomerSection, b as default };