@tesouro/embedded-components-react 0.11.206 → 0.11.211

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 (89) hide show
  1. package/dist/index.css +13 -126
  2. package/dist/index.d.ts +6 -5
  3. package/dist/lib/ReceivablesWidget.d.ts +6 -5
  4. package/dist/lib/WidgetSuite.d.ts +6 -5
  5. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivableAttachmentsSection.js +1 -1
  6. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivableCustomerSection.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +16 -18
  8. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/details.js +186 -239
  9. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/helpers.js +59 -52
  10. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +5 -4
  11. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/paymentRecord.js +5 -5
  12. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/paymentTerms.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/preview.js +1 -1
  14. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurrence.js +1 -1
  15. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurringSeries.js +19 -23
  16. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/reminders.js +1 -1
  17. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/statusColors.js +34 -0
  18. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +2 -6
  19. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActionsModal.js +5 -1
  20. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +16 -16
  21. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +1 -1
  22. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePaymentRecord.js +1 -2
  23. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesTable.js +2 -0
  24. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +28 -27
  25. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +18 -120
  26. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +89 -84
  27. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +91 -36
  28. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +41 -2
  29. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +2 -12
  30. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +9 -9
  31. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +9 -25
  32. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +26 -208
  33. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +209 -52
  34. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +50 -208
  35. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +186 -138
  36. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +157 -12
  37. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +10 -19
  38. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +23 -2
  39. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +2 -116
  40. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +117 -3
  41. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +3 -198
  42. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +198 -2
  43. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +2 -54
  44. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +14 -19
  45. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +22 -8
  46. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +40 -77
  47. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +17 -37
  48. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +8 -18
  49. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +61 -38
  50. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +27 -27
  51. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +26 -15
  52. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +14 -6
  53. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +19 -35
  54. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +31 -14
  55. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +67 -24
  56. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +391 -84
  57. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +2 -494
  58. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +47 -2
  59. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +62 -38
  60. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +433 -61
  61. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +176 -428
  62. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +20 -224
  63. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +6 -21
  64. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +264 -0
  65. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +2 -264
  66. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +131 -2
  67. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +22 -126
  68. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +235 -23
  69. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +3 -239
  70. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +247 -3
  71. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js +26 -244
  72. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index59.js +183 -26
  73. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index60.js +21 -194
  74. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index61.js +143 -21
  75. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index62.js +2 -143
  76. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index63.js +47 -2
  77. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index16.js +47 -48
  78. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index17.js +127 -144
  79. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index3.js +0 -3
  80. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index16.js +107 -111
  81. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index5.js +1 -1
  82. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index.js +2 -2
  83. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index7.js +2 -31
  84. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  85. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/helpers.js +1 -1
  86. package/dist/packages/shared-ui-shadcn/dist/index.js +1554 -1544
  87. package/package.json +1 -1
  88. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +0 -7
  89. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index64.js +0 -47
@@ -1,198 +1,3 @@
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";
5
- // ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.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
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 };
1
+ import "./index16.js";
2
+ import "./index25.js";
3
+ import "./index26.js";
@@ -1,2 +1,198 @@
1
- import "./index16.js";
2
- import "./index27.js";
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 "./index17.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";
5
+ // ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.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
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-sm 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 };
@@ -1,54 +1,2 @@
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";
2
- // ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.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 };
1
+ import "./index17.js";
2
+ import "./index28.js";
@@ -1,22 +1,17 @@
1
- import { Typography as e, cn as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { amountValueToneClass as n } from "./index29.js";
3
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
1
+ import { Badge as e, BadgeAccent as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { jsx as n } from "react/jsx-runtime";
4
3
  // ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.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
- })]
4
+ var r = new Set(Object.values(t));
5
+ function i(e) {
6
+ return r.has(e);
7
+ }
8
+ function a({ label: t, color: r }) {
9
+ return i(r) ? /* @__PURE__ */ n(e, {
10
+ accent: r,
11
+ children: t
12
+ }) : /* @__PURE__ */ n(e, {
13
+ tone: r,
14
+ children: t
20
15
  });
21
16
  }
22
- export { a as AmountCell };
17
+ export { a as StatusBadge };
@@ -1,9 +1,23 @@
1
+ import { DisplayAmount as e, Typography as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
1
3
  // ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.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 };
4
+ function i({ row: i }) {
5
+ return /* @__PURE__ */ r("div", {
6
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
7
+ children: [/* @__PURE__ */ n(t, {
8
+ variant: "caption",
9
+ color: "muted",
10
+ className: "ttw:font-medium",
11
+ children: i.label
12
+ }), i.emphasis ? /* @__PURE__ */ n(e, {
13
+ component: "span",
14
+ children: i.value
15
+ }) : /* @__PURE__ */ n(t, {
16
+ component: "span",
17
+ variant: "body1",
18
+ className: "ttw:font-medium ttw:tabular-nums",
19
+ children: i.value
20
+ })]
21
+ });
22
+ }
23
+ export { i as AmountCell };
@@ -1,78 +1,41 @@
1
- import { AccordionContent as e, AccordionItem as t, AccordionTrigger as n, Badge as r, Typography as i } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { RECEIVABLE_DETAILS_SECTION as a } from "./index31.js";
3
- import { sectionChevronClass as o, sectionCountBadgeClass as s, sectionItemClass as c, sectionTriggerClass as l } from "./index29.js";
4
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
5
- import { Check as f } from "lucide-react";
1
+ import { Ban as e, CalendarX2 as t, CircleCheck as n, CircleOff as r, CircleX as i, ClipboardCheck as a, CopyPlus as o, FileCheck as s, Mail as c, Pause as l, Pencil as u, Play as d, Send as f, Trash2 as p } from "lucide-react";
6
2
  // ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js
7
- function p({ attachments: p, labels: m }) {
8
- return /* @__PURE__ */ d(t, {
9
- value: a.attachments,
10
- className: c,
11
- children: [/* @__PURE__ */ u(n, {
12
- className: l,
13
- iconClassName: o,
14
- children: /* @__PURE__ */ d("span", {
15
- className: "ttw:flex ttw:items-center ttw:gap-2",
16
- children: [/* @__PURE__ */ u("span", {
17
- className: "ttw:group-hover:underline",
18
- children: m.attachmentsHeading
19
- }), /* @__PURE__ */ u(r, {
20
- variant: "secondary",
21
- className: s,
22
- children: p.countLabel
23
- })]
24
- })
25
- }), /* @__PURE__ */ u(e, { children: p.rows.length === 0 ? /* @__PURE__ */ u(i, {
26
- variant: "body2",
27
- color: "muted",
28
- children: m.attachmentsEmpty
29
- }) : /* @__PURE__ */ d("table", {
30
- className: "ttw:w-full ttw:border-collapse",
31
- children: [/* @__PURE__ */ u("thead", { children: /* @__PURE__ */ d("tr", {
32
- className: "ttw:border-b ttw:border-border",
33
- children: [/* @__PURE__ */ u("th", {
34
- scope: "col",
35
- className: "ttw:py-2 ttw:text-left",
36
- children: /* @__PURE__ */ u(i, {
37
- component: "span",
38
- variant: "caption",
39
- color: "muted",
40
- children: m.attachmentsFileColumn
41
- })
42
- }), /* @__PURE__ */ u("th", {
43
- scope: "col",
44
- className: "ttw:py-2 ttw:text-right",
45
- children: /* @__PURE__ */ u(i, {
46
- component: "span",
47
- variant: "caption",
48
- color: "muted",
49
- children: m.attachmentsEmailedColumn
50
- })
51
- })]
52
- }) }), /* @__PURE__ */ u("tbody", { children: p.rows.map((e) => /* @__PURE__ */ d("tr", {
53
- className: "ttw:border-b ttw:border-border ttw:last:border-b-0",
54
- children: [/* @__PURE__ */ u("td", {
55
- className: "ttw:py-3",
56
- children: /* @__PURE__ */ u("a", {
57
- href: e.url,
58
- target: "_blank",
59
- rel: "noreferrer",
60
- className: "ttw:text-primary ttw:hover:underline",
61
- children: e.name
62
- })
63
- }), /* @__PURE__ */ u("td", {
64
- className: "ttw:py-3 ttw:text-right ttw:align-middle",
65
- children: e.includeInEmail ? /* @__PURE__ */ u(f, {
66
- role: "img",
67
- "aria-label": e.emailedLabel,
68
- className: "ttw:inline-block ttw:size-4 ttw:text-emerald-600"
69
- }) : /* @__PURE__ */ u("span", {
70
- className: "ttw:sr-only",
71
- children: e.emailedLabel
72
- })
73
- })]
74
- }, e.id)) })]
75
- }) })]
76
- });
77
- }
78
- export { p as AttachmentsItem };
3
+ var m = {
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
+ }, h = {
20
+ edit: u,
21
+ issue: s,
22
+ issueAndSend: f,
23
+ recordPayment: a,
24
+ send: c,
25
+ accept: n,
26
+ decline: i,
27
+ markPaid: n,
28
+ markUncollectible: r,
29
+ cancel: e,
30
+ clone: o,
31
+ delete: p,
32
+ pauseRecurrence: l,
33
+ resumeRecurrence: d,
34
+ cancelRecurrence: t
35
+ }, g = /* @__PURE__ */ new Set([
36
+ "delete",
37
+ "cancel",
38
+ "markUncollectible",
39
+ "cancelRecurrence"
40
+ ]), _ = "ttw:border-border", v = (e) => e.preventDefault();
41
+ export { h as ACTION_ICON, m as ACTION_LABEL_KEY, g as DESTRUCTIVE_ACTIONS, v as preventTooltipFocusOpen, _ as sectionItemClass };