@tesouro/embedded-components-react 0.11.70 → 0.11.72

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 (97) hide show
  1. package/README.md +1 -0
  2. package/dist/index.css +41 -192
  3. package/dist/index.d.ts +93 -73
  4. package/dist/lib/SettingsWidget.d.ts +5 -1
  5. package/dist/lib/WidgetSuite.d.ts +22 -2
  6. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index3.js +8 -7
  7. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index4.js +4 -1
  8. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index6.js +196 -131
  9. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index.js +4 -4
  10. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index3.js +11 -1
  11. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index4.js +5 -3
  12. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index5.js +38 -32
  13. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index6.js +103 -75
  14. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index7.js +140 -168
  15. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index8.js +97 -87
  16. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/feature/dist/index7.js +11 -7
  17. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/feature/dist/index8.js +0 -1
  18. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index2.js +3 -1
  19. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index3.js +134 -177
  20. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index4.js +110 -176
  21. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index5.js +28 -38
  22. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/ExpenseSettingsTabs/ExpenseSettingsTabs.js +13 -10
  23. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/SettingsWidget/SettingsWidget.js +28 -24
  24. package/dist/libs/tesouro-embedded-components-react/settings-widget/help/ui/shadcn/dist/index3.js +35 -31
  25. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index10.js +2 -0
  26. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index7.js +1 -5
  27. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index8.js +3 -0
  28. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index11.js +2 -1
  29. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index12.js +22 -36
  30. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index16.js +1 -1
  31. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index17.js +54 -60
  32. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index20.js +75 -60
  33. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index3.js +42 -27
  34. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index6.js +89 -82
  35. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index9.js +39 -38
  36. package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/feature/dist/index4.js +32 -32
  37. package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/ui/dist/index2.js +1 -1
  38. package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/ui/dist/index3.js +56 -71
  39. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index10.js +3 -0
  40. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index12.js +86 -66
  41. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index13.js +51 -51
  42. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index15.js +146 -132
  43. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index17.js +95 -99
  44. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index3.js +1 -0
  45. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index4.js +8 -27
  46. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index5.js +69 -72
  47. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index6.js +51 -51
  48. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index.js +9 -11
  49. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index10.js +83 -298
  50. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index11.js +13 -13
  51. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index12.js +122 -75
  52. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index13.js +41 -15
  53. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index14.js +7 -131
  54. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index15.js +147 -48
  55. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index16.js +240 -11
  56. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index17.js +15 -173
  57. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index2.js +38 -10
  58. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index3.js +5 -46
  59. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index4.js +52 -45
  60. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index5.js +101 -25
  61. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index6.js +40 -98
  62. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index7.js +415 -40
  63. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index8.js +261 -332
  64. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index9.js +15 -8
  65. package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js +2 -2
  66. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js +9 -8
  67. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/useApprovalPolicyRules.js +136 -122
  68. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index.js +9 -8
  69. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js +16 -17
  70. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index12.js +99 -100
  71. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index16.js +1 -1
  72. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index17.js +8 -8
  73. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index18.js +10 -55
  74. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index19.js +34 -8
  75. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index20.js +8 -84
  76. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index21.js +86 -0
  77. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index3.js +13 -13
  78. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index5.js +17 -18
  79. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index7.js +33 -42
  80. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  81. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +24 -24
  82. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/FileDropZone/FileDropZone.js +62 -0
  83. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/LoadingRegion/LoadingRegion.js +1 -0
  84. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/WidgetSuiteProvider.js +12 -4
  85. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/labels.js +9 -0
  86. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/BillPaySection.js +12 -9
  87. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/CardsSection.js +25 -23
  88. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/DashboardQuickActions.js +74 -0
  89. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/DashboardSection.js +20 -16
  90. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/InvoicingSection.js +15 -9
  91. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/SettingsSection.js +15 -8
  92. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/TransfersSection.js +23 -21
  93. package/dist/packages/shared-ui-shadcn/dist/index.js +2336 -2274
  94. package/package.json +1 -1
  95. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index18.js +0 -291
  96. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index19.js +0 -22
  97. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/avatarSwatch.js +0 -26
@@ -1,184 +1,118 @@
1
- import { Button as e, DropdownMenu as t, DropdownMenuContent as n, DropdownMenuItem as r, DropdownMenuTrigger as i, Input as a, Label as o, Sheet as s, SheetClose as c, SheetContent as l, SheetDescription as u, SheetFooter as d, SheetHeader as f, SheetTitle as p, Textarea as m, Tooltip as h, TooltipContent as g, TooltipProvider as _, TooltipTrigger as v } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { ACCOUNT_FORM_SHEET_LABELS_EN as y } from "./index2.js";
3
- import { useId as b } from "react";
4
- import { jsx as x, jsxs as S } from "react/jsx-runtime";
5
- import { MoreVerticalIcon as C, Trash2Icon as w, XIcon as T } from "lucide-react";
1
+ import { FieldError as e, FieldRequirement as t, FormSheet as n, Input as r, Label as i, RequiredFieldsLegend as a, Textarea as o } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { InlineErrorAlert as s } from "../../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
3
+ import "../../../../shared/ui/dist/index.js";
4
+ import { ACCOUNT_FORM_SHEET_LABELS_EN as c } from "./index2.js";
5
+ import { useId as l } from "react";
6
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
6
7
  // ../../libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index4.js
7
- function E({ open: E, onOpenChange: D, title: O, description: k, values: A, errors: j, inProgress: M, submitDisabled: N, descriptionCounterText: P, onNameChange: F, onGlCodeChange: I, onDescriptionChange: L, onSubmit: R, onCancel: z, onDelete: B, labels: V }) {
8
- let H = {
9
- ...y,
10
- ...V
11
- }, U = b(), W = "ttw:text-sm ttw:text-destructive", G = !N && !M;
12
- return /* @__PURE__ */ x(s, {
13
- open: E,
14
- onOpenChange: D,
15
- children: /* @__PURE__ */ S(l, {
16
- showCloseButton: !1,
17
- className: "ttw:w-[423px] ttw:sm:max-w-[423px]",
8
+ function f({ open: f, onOpenChange: p, title: m, description: h, values: g, errors: _, inProgress: v, descriptionCounterText: y, onNameChange: b, onGlCodeChange: x, onDescriptionChange: S, onSubmit: C, onCancel: w, onDelete: T, labels: E }) {
9
+ let D = {
10
+ ...c,
11
+ ...E
12
+ }, O = l();
13
+ return /* @__PURE__ */ u(n, {
14
+ open: f,
15
+ onOpenChange: (e) => {
16
+ v || (e || w(), p(e));
17
+ },
18
+ title: m,
19
+ description: h,
20
+ submitting: v,
21
+ onSubmit: () => C(),
22
+ onDelete: T,
23
+ labels: {
24
+ submit: D.saveButton,
25
+ cancel: D.cancelButton,
26
+ close: D.closeSheet,
27
+ delete: D.deleteAction
28
+ },
29
+ children: /* @__PURE__ */ d("div", {
30
+ className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:py-4",
18
31
  children: [
19
- /* @__PURE__ */ S(f, { children: [/* @__PURE__ */ S("div", {
20
- className: "ttw:flex ttw:items-center ttw:gap-2",
21
- children: [/* @__PURE__ */ x(p, {
22
- className: "ttw:min-w-0 ttw:flex-1 ttw:truncate",
23
- children: O
24
- }), /* @__PURE__ */ S("div", {
25
- className: "ttw:flex ttw:shrink-0 ttw:items-center ttw:gap-1",
26
- children: [B && /* @__PURE__ */ S(t, { children: [/* @__PURE__ */ x(i, {
27
- asChild: !0,
28
- children: /* @__PURE__ */ x(e, {
29
- variant: "ghost",
30
- size: "icon-sm",
31
- "aria-label": H.openAccountMenu,
32
- disabled: M,
33
- children: /* @__PURE__ */ x(C, { className: "ttw:h-4 ttw:w-4" })
34
- })
35
- }), /* @__PURE__ */ x(n, {
36
- align: "end",
37
- children: /* @__PURE__ */ S(r, {
38
- variant: "destructive",
39
- onClick: B,
40
- children: [/* @__PURE__ */ x(w, { className: "ttw:mr-2 ttw:h-4 ttw:w-4" }), H.deleteAction]
41
- })
42
- })] }), /* @__PURE__ */ x(c, {
43
- asChild: !0,
44
- children: /* @__PURE__ */ x(e, {
45
- type: "button",
46
- variant: "ghost",
47
- size: "icon-sm",
48
- "aria-label": H.closeSheet,
49
- children: /* @__PURE__ */ x(T, { className: "ttw:h-4 ttw:w-4" })
50
- })
51
- })]
52
- })]
53
- }), /* @__PURE__ */ x(u, {
54
- className: "ttw:sr-only",
55
- children: k
56
- })] }),
57
- /* @__PURE__ */ x("form", {
58
- id: U,
59
- onSubmit: (e) => {
60
- e.preventDefault(), e.stopPropagation(), R();
61
- },
62
- children: /* @__PURE__ */ S("div", {
63
- className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:px-6 ttw:pt-6 ttw:pb-6",
64
- children: [
65
- j?.form && /* @__PURE__ */ x("p", {
66
- role: "alert",
67
- className: "ttw:rounded-md ttw:bg-destructive/10 ttw:px-3 ttw:py-2 ttw:text-sm ttw:text-destructive",
68
- children: j.form
69
- }),
70
- /* @__PURE__ */ S("div", {
71
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
72
- children: [
73
- /* @__PURE__ */ x(o, {
74
- htmlFor: `${U}-gl-code`,
75
- children: H.glCodeLabel
76
- }),
77
- /* @__PURE__ */ x(a, {
78
- id: `${U}-gl-code`,
79
- "data-autofocus": !0,
80
- maxLength: 20,
81
- value: A.nominal_code,
82
- placeholder: H.glCodePlaceholder,
83
- "aria-invalid": !!j?.nominal_code,
84
- "aria-describedby": j?.nominal_code ? `${U}-gl-code-error` : void 0,
85
- disabled: M,
86
- onChange: (e) => I(e.target.value)
87
- }),
88
- j?.nominal_code && /* @__PURE__ */ x("p", {
89
- role: "alert",
90
- id: `${U}-gl-code-error`,
91
- className: W,
92
- children: j.nominal_code
93
- })
94
- ]
95
- }),
96
- /* @__PURE__ */ S("div", {
97
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
98
- children: [
99
- /* @__PURE__ */ x(o, {
100
- htmlFor: `${U}-name`,
101
- children: H.nameLabel
102
- }),
103
- /* @__PURE__ */ x(a, {
104
- id: `${U}-name`,
105
- value: A.name,
106
- placeholder: H.namePlaceholder,
107
- "aria-invalid": !!j?.name,
108
- "aria-describedby": j?.name ? `${U}-name-error` : void 0,
109
- disabled: M,
110
- onChange: (e) => F(e.target.value)
111
- }),
112
- j?.name && /* @__PURE__ */ x("p", {
113
- role: "alert",
114
- id: `${U}-name-error`,
115
- className: W,
116
- children: j.name
117
- })
118
- ]
119
- }),
120
- /* @__PURE__ */ S("div", {
121
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
122
- children: [
123
- /* @__PURE__ */ x(o, {
124
- htmlFor: `${U}-description`,
125
- children: H.descriptionLabel
126
- }),
127
- /* @__PURE__ */ x(m, {
128
- id: `${U}-description`,
129
- rows: 4,
130
- maxLength: 280,
131
- value: A.description,
132
- placeholder: H.descriptionPlaceholder,
133
- "aria-invalid": !!j?.description,
134
- "aria-describedby": j?.description ? `${U}-description-error` : `${U}-description-counter`,
135
- disabled: M,
136
- onChange: (e) => L(e.target.value)
137
- }),
138
- /* @__PURE__ */ x("p", {
139
- id: `${U}-description-counter`,
140
- className: "ttw:text-xs ttw:text-muted-foreground",
141
- children: P
142
- }),
143
- j?.description && /* @__PURE__ */ x("p", {
144
- role: "alert",
145
- id: `${U}-description-error`,
146
- className: W,
147
- children: j.description
148
- })
149
- ]
150
- })
151
- ]
152
- })
32
+ _?.form && /* @__PURE__ */ u(s, { children: _.form }),
33
+ /* @__PURE__ */ u(a, {}),
34
+ /* @__PURE__ */ d("div", {
35
+ className: "ttw:flex ttw:flex-col ttw:gap-1.5",
36
+ children: [
37
+ /* @__PURE__ */ u(i, {
38
+ htmlFor: `${O}-gl-code`,
39
+ requirement: t.Required,
40
+ children: D.glCodeLabel
41
+ }),
42
+ /* @__PURE__ */ u(r, {
43
+ id: `${O}-gl-code`,
44
+ required: !0,
45
+ "data-autofocus": !0,
46
+ maxLength: 20,
47
+ value: g.nominal_code,
48
+ placeholder: D.glCodePlaceholder,
49
+ "aria-invalid": !!_?.nominal_code,
50
+ "aria-describedby": _?.nominal_code ? `${O}-gl-code-error` : void 0,
51
+ disabled: v,
52
+ onChange: (e) => x(e.target.value)
53
+ }),
54
+ _?.nominal_code && /* @__PURE__ */ u(e, {
55
+ id: `${O}-gl-code-error`,
56
+ children: _.nominal_code
57
+ })
58
+ ]
59
+ }),
60
+ /* @__PURE__ */ d("div", {
61
+ className: "ttw:flex ttw:flex-col ttw:gap-1.5",
62
+ children: [
63
+ /* @__PURE__ */ u(i, {
64
+ htmlFor: `${O}-name`,
65
+ requirement: t.Required,
66
+ children: D.nameLabel
67
+ }),
68
+ /* @__PURE__ */ u(r, {
69
+ id: `${O}-name`,
70
+ required: !0,
71
+ value: g.name,
72
+ placeholder: D.namePlaceholder,
73
+ "aria-invalid": !!_?.name,
74
+ "aria-describedby": _?.name ? `${O}-name-error` : void 0,
75
+ disabled: v,
76
+ onChange: (e) => b(e.target.value)
77
+ }),
78
+ _?.name && /* @__PURE__ */ u(e, {
79
+ id: `${O}-name-error`,
80
+ children: _.name
81
+ })
82
+ ]
153
83
  }),
154
- /* @__PURE__ */ x(d, { children: /* @__PURE__ */ S("div", {
155
- className: "ttw:flex ttw:flex-row ttw:gap-2",
156
- children: [/* @__PURE__ */ x(e, {
157
- type: "button",
158
- variant: "outline",
159
- size: "lg",
160
- className: "ttw:flex-1",
161
- onClick: z,
162
- disabled: M,
163
- children: H.cancelButton
164
- }), /* @__PURE__ */ x(_, { children: /* @__PURE__ */ S(h, { children: [/* @__PURE__ */ x(v, {
165
- asChild: !0,
166
- children: /* @__PURE__ */ x("span", {
167
- className: "ttw:flex-1",
168
- children: /* @__PURE__ */ x(e, {
169
- type: "submit",
170
- form: U,
171
- size: "lg",
172
- className: "ttw:w-full",
173
- disabled: !G,
174
- loading: M,
175
- children: H.saveButton
176
- })
84
+ /* @__PURE__ */ d("div", {
85
+ className: "ttw:flex ttw:flex-col ttw:gap-1.5",
86
+ children: [
87
+ /* @__PURE__ */ u(i, {
88
+ htmlFor: `${O}-description`,
89
+ requirement: t.Optional,
90
+ children: D.descriptionLabel
91
+ }),
92
+ /* @__PURE__ */ u(o, {
93
+ id: `${O}-description`,
94
+ rows: 4,
95
+ maxLength: 280,
96
+ value: g.description,
97
+ placeholder: D.descriptionPlaceholder,
98
+ "aria-invalid": !!_?.description,
99
+ "aria-describedby": _?.description ? `${O}-description-error` : `${O}-description-counter`,
100
+ disabled: v,
101
+ onChange: (e) => S(e.target.value)
102
+ }),
103
+ /* @__PURE__ */ u("p", {
104
+ id: `${O}-description-counter`,
105
+ className: "ttw:text-xs ttw:text-muted-foreground",
106
+ children: y
107
+ }),
108
+ _?.description && /* @__PURE__ */ u(e, {
109
+ id: `${O}-description-error`,
110
+ children: _.description
177
111
  })
178
- }), N && /* @__PURE__ */ x(g, { children: H.saveDisabledHint })] }) })]
179
- }) })
112
+ ]
113
+ })
180
114
  ]
181
115
  })
182
116
  });
183
117
  }
184
- export { E as AccountFormSheet, E as default };
118
+ export { f as AccountFormSheet, f as default };
@@ -1,42 +1,32 @@
1
- import { AlertDialog as e, AlertDialogCancel as t, AlertDialogContent as n, AlertDialogDescription as r, AlertDialogFooter as i, AlertDialogHeader as a, AlertDialogTitle as o, Button as s } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { ACCOUNT_DELETE_DIALOG_LABELS_EN as c } from "./index2.js";
3
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
1
+ import { ConfirmDialog as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { InlineErrorAlert as t } from "../../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
3
+ import "../../../../shared/ui/dist/index.js";
4
+ import { ACCOUNT_DELETE_DIALOG_LABELS_EN as n } from "./index2.js";
5
+ import { jsx as r } from "react/jsx-runtime";
6
+ import { Trash2 as i } from "lucide-react";
4
7
  // ../../libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index5.js
5
- function d({ open: d, onOpenChange: f, title: p, message: m, isDeleting: h, error: g, onConfirm: _, onCancel: v, labels: y }) {
6
- let b = {
7
- ...c,
8
- ...y
8
+ function a({ open: a, onOpenChange: o, title: s, message: c, isDeleting: l, error: u, onConfirm: d, onCancel: f, labels: p }) {
9
+ let m = {
10
+ ...n,
11
+ ...p
9
12
  };
10
- return /* @__PURE__ */ l(e, {
11
- open: d,
12
- onOpenChange: f,
13
- children: /* @__PURE__ */ u(n, {
14
- closeDisabled: h,
15
- labels: { close: b.close },
16
- children: [
17
- /* @__PURE__ */ u(a, { children: [/* @__PURE__ */ l(o, { children: p }), /* @__PURE__ */ l(r, { children: m ?? b.message })] }),
18
- g && /* @__PURE__ */ l("p", {
19
- role: "alert",
20
- className: "ttw:rounded-md ttw:bg-destructive/10 ttw:px-3 ttw:py-2 ttw:text-sm ttw:text-destructive",
21
- children: g
22
- }),
23
- /* @__PURE__ */ u(i, { children: [/* @__PURE__ */ l(t, {
24
- asChild: !0,
25
- children: /* @__PURE__ */ l(s, {
26
- variant: "outline",
27
- onClick: v,
28
- disabled: h,
29
- children: b.cancelButton
30
- })
31
- }), /* @__PURE__ */ l(s, {
32
- variant: "destructive",
33
- onClick: _,
34
- disabled: h,
35
- loading: h,
36
- children: b.confirmButton
37
- })] })
38
- ]
39
- })
13
+ return /* @__PURE__ */ r(e, {
14
+ open: a,
15
+ onOpenChange: (e) => {
16
+ l || (e || f(), o(e));
17
+ },
18
+ title: s,
19
+ description: c ?? m.message,
20
+ icon: /* @__PURE__ */ r(i, { "aria-hidden": !0 }),
21
+ destructive: !0,
22
+ loading: l,
23
+ onConfirm: d,
24
+ labels: {
25
+ confirm: m.confirmButton,
26
+ cancel: m.cancelButton,
27
+ close: m.close
28
+ },
29
+ children: u && /* @__PURE__ */ r(t, { children: u })
40
30
  });
41
31
  }
42
- export { d as AccountDeleteDialog, d as default };
32
+ export { a as AccountDeleteDialog, a as default };
@@ -11,24 +11,27 @@ import { useState as o } from "react";
11
11
  import { jsx as s, jsxs as c } from "react/jsx-runtime";
12
12
  // ../../libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/ExpenseSettingsTabs/ExpenseSettingsTabs.js
13
13
  function l({ approvalsLabel: l, requirementsLabel: u }) {
14
- let [d, f] = o("approvals");
14
+ let [d, f] = o("approvals"), [p, m] = o(null);
15
15
  return /* @__PURE__ */ s("div", {
16
16
  className: "ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card ttw:p-6",
17
17
  children: /* @__PURE__ */ c(e, {
18
18
  value: d,
19
19
  onValueChange: f,
20
- className: "ttw:w-full ttw:space-y-5",
20
+ className: "ttw:flex ttw:w-full ttw:flex-col ttw:gap-4",
21
21
  children: [
22
- /* @__PURE__ */ c(n, { children: [/* @__PURE__ */ s(r, {
23
- value: "approvals",
24
- children: l
25
- }), /* @__PURE__ */ s(r, {
26
- value: "requirements",
27
- children: u
28
- })] }),
22
+ /* @__PURE__ */ c("div", {
23
+ className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4",
24
+ children: [/* @__PURE__ */ c(n, { children: [/* @__PURE__ */ s(r, {
25
+ value: "approvals",
26
+ children: l
27
+ }), /* @__PURE__ */ s(r, {
28
+ value: "requirements",
29
+ children: u
30
+ })] }), /* @__PURE__ */ s("div", { ref: m })]
31
+ }),
29
32
  /* @__PURE__ */ s(t, {
30
33
  value: "approvals",
31
- children: /* @__PURE__ */ s(i, {})
34
+ children: /* @__PURE__ */ s(i, { headerActionContainer: p })
32
35
  }),
33
36
  /* @__PURE__ */ s(t, {
34
37
  value: "requirements",
@@ -48,7 +48,7 @@ var T = {
48
48
  [s.Legal]: [],
49
49
  [s.Help]: []
50
50
  };
51
- function E({ labels: t, featureLabels: r, acceptInviteRedirectUri: u, teamInitialView: E, helpContactUrl: D, helpFaq: O, profileContactUrl: k, selectedSection: A, defaultSelectedSection: j, onSelectedSectionChange: M, additionalSections: N, profileContent: ee, teamContent: te, billPayContent: ne, helpContent: P, expenseContent: F, accountingContent: I, invoiceContent: L, legalContent: R }) {
51
+ function E({ labels: t, featureLabels: r, acceptInviteRedirectUri: u, teamInitialView: E, helpContactUrl: D, helpFaq: O, profileContactUrl: k, showProfileHeader: A, selectedSection: j, defaultSelectedSection: M, onSelectedSectionChange: ee, additionalSections: te, profileContent: ne, teamContent: re, billPayContent: N, helpContent: P, expenseContent: F, accountingContent: I, invoiceContent: L, legalContent: R }) {
52
52
  let z = {
53
53
  ...o,
54
54
  ...r
@@ -60,12 +60,15 @@ function E({ labels: t, featureLabels: r, acceptInviteRedirectUri: u, teamInitia
60
60
  {
61
61
  id: s.Profile,
62
62
  label: z.profileSection,
63
- content: ee ?? /* @__PURE__ */ C(v, { contactUrl: k })
63
+ content: ne ?? /* @__PURE__ */ C(v, {
64
+ contactUrl: k,
65
+ showHeader: A
66
+ })
64
67
  },
65
68
  {
66
69
  id: s.Team,
67
70
  label: z.teamSection,
68
- content: te ?? /* @__PURE__ */ C(m, {
71
+ content: re ?? /* @__PURE__ */ C(m, {
69
72
  acceptInviteRedirectUri: u,
70
73
  initialView: K ? void 0 : E
71
74
  })
@@ -86,7 +89,7 @@ function E({ labels: t, featureLabels: r, acceptInviteRedirectUri: u, teamInitia
86
89
  {
87
90
  id: s.BillPay,
88
91
  label: z.billPaySection,
89
- content: ne ?? /* @__PURE__ */ C(a, {
92
+ content: N ?? /* @__PURE__ */ C(a, {
90
93
  showHeaderTitle: !1,
91
94
  componentLabels: { header: { Description: z.billPayDescription } }
92
95
  })
@@ -109,14 +112,14 @@ function E({ labels: t, featureLabels: r, acceptInviteRedirectUri: u, teamInitia
109
112
  faq: O
110
113
  })
111
114
  }
112
- ], J = c(q.filter((t) => T[t.id].every((t) => e(U, [t]))), N ?? []), Y = J[0]?.id ?? "", [X, Z] = w({
113
- prop: A,
114
- defaultProp: j ?? Y,
115
- onChange: M,
115
+ ], J = c(q.filter((t) => T[t.id].every((t) => e(U, [t]))), te ?? []), Y = J[0]?.id ?? "", [X, Z] = w({
116
+ prop: j,
117
+ defaultProp: M ?? Y,
118
+ onChange: ee,
116
119
  caller: "SettingsWidget"
117
120
  }), Q = J.some((e) => e.id === X) ? X : Y, $ = Q === s.Team;
118
121
  W === "unseen" && $ ? G("showing") : W === "showing" && !$ && G("spent");
119
- let re = y((e) => {
122
+ let ie = y((e) => {
120
123
  let t = B.current;
121
124
  Q !== s.Invoice || !t ? Z(e) : t.confirmLeave().then((t) => {
122
125
  t && Z(e);
@@ -126,12 +129,12 @@ function E({ labels: t, featureLabels: r, acceptInviteRedirectUri: u, teamInitia
126
129
  labels: t,
127
130
  sections: J,
128
131
  selectedSectionId: Q,
129
- onSectionChange: re
132
+ onSectionChange: ie
130
133
  });
131
134
  }
132
- function D({ labels: e, featureLabels: t, acceptInviteRedirectUri: n, teamInitialView: i, helpContactUrl: a, helpFaq: o, profileContactUrl: s, selectedSection: c, defaultSelectedSection: l, onSelectedSectionChange: d, additionalSections: f, profileContent: p, teamContent: m, billPayContent: h, helpContent: g, expenseContent: _, accountingContent: v, invoiceContent: y, legalContent: b, ...x }) {
135
+ function D({ labels: e, featureLabels: t, acceptInviteRedirectUri: n, teamInitialView: i, helpContactUrl: a, helpFaq: o, profileContactUrl: s, showProfileHeader: c, selectedSection: l, defaultSelectedSection: d, onSelectedSectionChange: f, additionalSections: p, profileContent: m, teamContent: h, billPayContent: g, helpContent: _, expenseContent: v, accountingContent: y, invoiceContent: b, legalContent: x, ...S }) {
133
136
  return /* @__PURE__ */ C(r, {
134
- ...x,
137
+ ...S,
135
138
  widgetName: u,
136
139
  children: /* @__PURE__ */ C(E, {
137
140
  labels: e,
@@ -141,18 +144,19 @@ function D({ labels: e, featureLabels: t, acceptInviteRedirectUri: n, teamInitia
141
144
  helpContactUrl: a,
142
145
  helpFaq: o,
143
146
  profileContactUrl: s,
144
- selectedSection: c,
145
- defaultSelectedSection: l,
146
- onSelectedSectionChange: d,
147
- additionalSections: f,
148
- profileContent: p,
149
- teamContent: m,
150
- billPayContent: h,
151
- helpContent: g,
152
- expenseContent: _,
153
- accountingContent: v,
154
- invoiceContent: y,
155
- legalContent: b
147
+ showProfileHeader: c,
148
+ selectedSection: l,
149
+ defaultSelectedSection: d,
150
+ onSelectedSectionChange: f,
151
+ additionalSections: p,
152
+ profileContent: m,
153
+ teamContent: h,
154
+ billPayContent: g,
155
+ helpContent: _,
156
+ expenseContent: v,
157
+ accountingContent: y,
158
+ invoiceContent: b,
159
+ legalContent: x
156
160
  })
157
161
  });
158
162
  }
@@ -1,47 +1,51 @@
1
- import { Accordion as e, AccordionContent as t, AccordionItem as n, AccordionTrigger as r } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { HELP_WIDGET_LABELS_EN as i } from "../../contract/dist/index2.js";
1
+ import { Accordion as e, AccordionContent as t, AccordionItem as n, AccordionTrigger as r, Heading as i } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { HELP_WIDGET_LABELS_EN as a } from "../../contract/dist/index2.js";
3
3
  import "../../contract/dist/index.js";
4
- import { AnswerBlocks as a } from "./index2.js";
5
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
4
+ import { AnswerBlocks as o } from "./index2.js";
5
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
6
6
  // ../../libs/tesouro-embedded-components-react/settings-widget/help/ui/shadcn/dist/index3.js
7
- var c = "ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card ttw:p-6";
8
- function l({ faq: l, bankName: u, contactUrl: d, labels: f }) {
9
- let p = {
10
- ...i,
11
- ...f
7
+ var l = "ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card ttw:p-6";
8
+ function u({ faq: u, bankName: d, contactUrl: f, labels: p }) {
9
+ let m = {
10
+ ...a,
11
+ ...p
12
12
  };
13
- return /* @__PURE__ */ o("div", {
14
- className: c,
15
- children: /* @__PURE__ */ s("div", {
13
+ return /* @__PURE__ */ s("div", {
14
+ className: l,
15
+ children: /* @__PURE__ */ c("div", {
16
16
  className: "ttw:space-y-8",
17
- children: [l.map((i) => /* @__PURE__ */ s("section", { children: [/* @__PURE__ */ o("h3", {
18
- className: "ttw:mb-2 ttw:text-lg ttw:font-semibold ttw:text-primary",
19
- children: i.title
20
- }), /* @__PURE__ */ o(e, {
17
+ children: [u.map((a) => /* @__PURE__ */ c("section", { children: [/* @__PURE__ */ s(i, {
18
+ variant: "section",
19
+ level: 3,
20
+ className: "ttw:mb-2",
21
+ children: a.title
22
+ }), /* @__PURE__ */ s(e, {
21
23
  type: "single",
22
24
  collapsible: !0,
23
25
  className: "ttw:w-full ttw:space-y-3",
24
- children: i.items.map((e, c) => /* @__PURE__ */ s(n, {
25
- value: `${i.title}-${c}`,
26
- className: "ttw:rounded-lg ttw:border ttw:border-border ttw:px-4 ttw:last:border-b",
27
- children: [/* @__PURE__ */ o(r, { children: e.question }), /* @__PURE__ */ o(t, { children: /* @__PURE__ */ o(a, { answers: e.answers }) })]
28
- }, `${i.title}-${c}`))
29
- })] }, i.title)), d && u && /* @__PURE__ */ s("section", { children: [/* @__PURE__ */ o("h3", {
30
- className: "ttw:mb-1 ttw:text-lg ttw:font-semibold ttw:text-primary",
31
- children: p.contactUsTitle
32
- }), /* @__PURE__ */ s("p", {
26
+ children: a.items.map((e, i) => /* @__PURE__ */ c(n, {
27
+ value: `${a.title}-${i}`,
28
+ className: "ttw:border-border",
29
+ children: [/* @__PURE__ */ s(r, { children: e.question }), /* @__PURE__ */ s(t, { children: /* @__PURE__ */ s(o, { answers: e.answers }) })]
30
+ }, `${a.title}-${i}`))
31
+ })] }, a.title)), f && d && /* @__PURE__ */ c("section", { children: [/* @__PURE__ */ s(i, {
32
+ variant: "section",
33
+ level: 3,
34
+ className: "ttw:mb-1",
35
+ children: m.contactUsTitle
36
+ }), /* @__PURE__ */ c("p", {
33
37
  className: "ttw:text-sm ttw:text-muted-foreground",
34
38
  children: [
35
- p.contactUsBody,
39
+ m.contactUsBody,
36
40
  " ",
37
- u,
41
+ d,
38
42
  " ",
39
- /* @__PURE__ */ o("a", {
40
- href: d,
43
+ /* @__PURE__ */ s("a", {
44
+ href: f,
41
45
  target: "_blank",
42
46
  rel: "noopener noreferrer",
43
47
  className: "ttw:font-medium ttw:text-primary ttw:underline",
44
- children: p.contactUsLinkText
48
+ children: m.contactUsLinkText
45
49
  }),
46
50
  "."
47
51
  ]
@@ -49,4 +53,4 @@ function l({ faq: l, bankName: u, contactUrl: d, labels: f }) {
49
53
  })
50
54
  });
51
55
  }
52
- export { l as HelpWidgetShadcn, l as default };
56
+ export { u as HelpWidgetShadcn, u as default };
@@ -90,6 +90,8 @@ function T({ handleRef: r, panelLabels: o, logoLabels: u, dropzoneLabels: f, mes
90
90
  errorMessage: U.errorMessage,
91
91
  isDraggingOver: U.isDraggingOver,
92
92
  onBrowse: U.onBrowse,
93
+ onFilesSelected: U.onFilesSelected,
94
+ accept: U.fileInputProps.accept,
93
95
  onDelete: U.onDelete,
94
96
  onDismissError: U.onDismissError,
95
97
  onDragOver: U.onDragOver,
@@ -34,11 +34,7 @@ function g({ entityId: r, entitySettings: f, nextNumbers: p, messageLabels: m })
34
34
  n && !(n in e) && (e[n] = t.message);
35
35
  }
36
36
  return e;
37
- }, [k]), j = c((e) => C[e] !== T[e], [C, T]), M = l(() => Object.keys(T).some((e) => C[e] !== T[e]), [C, T]), N = c((e) => D || j(e) ? A[e] : void 0, [
38
- A,
39
- D,
40
- j
41
- ]), P = c((e, t) => {
37
+ }, [k]), j = c((e) => C[e] !== T[e], [C, T]), M = l(() => Object.keys(T).some((e) => C[e] !== T[e]), [C, T]), N = c((e) => D ? A[e] : void 0, [A, D]), P = c((e, t) => {
42
38
  w((n) => ({
43
39
  ...n,
44
40
  [e]: t
@@ -63,6 +63,9 @@ function d({ entityId: d, labels: f }) {
63
63
  uploadedLogoUrl: w,
64
64
  fileTypesHint: p.logoFileTypesHint(10),
65
65
  onBrowse: a(() => m.current?.click(), []),
66
+ onFilesSelected: a((e) => {
67
+ e[0] && A(e[0]);
68
+ }, [A]),
66
69
  onDelete: a(async () => {
67
70
  if (d) try {
68
71
  await D({ entityId: d }), j(), e.success(p.logoDeleted);
@@ -4,6 +4,7 @@ var e = {
4
4
  message: "Any unsaved changes will be lost.",
5
5
  question: "Are you sure you want to quit without saving?",
6
6
  confirmButton: "Quit without saving",
7
- cancelButton: "Cancel"
7
+ cancelButton: "Cancel",
8
+ close: "Close"
8
9
  };
9
10
  export { e as DISCARD_CHANGES_DIALOG_LABELS_EN };