@tesouro/embedded-components-react 0.11.71 → 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 (88) hide show
  1. package/README.md +1 -0
  2. package/dist/index.css +35 -192
  3. package/dist/index.d.ts +75 -71
  4. package/dist/lib/SettingsWidget.d.ts +5 -1
  5. package/dist/lib/WidgetSuite.d.ts +4 -0
  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/packages/shared-ui-shadcn/dist/index.js +2301 -2283
  85. package/package.json +1 -1
  86. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index18.js +0 -291
  87. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index19.js +0 -22
  88. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/avatarSwatch.js +0 -26
@@ -1,14 +1,243 @@
1
- import { Badge as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
- import { PenLine as r } from "lucide-react";
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { Badge as e, Button as t, DescriptionList as n, DropdownMenu as r, DropdownMenuContent as i, DropdownMenuItem as a, DropdownMenuSeparator as o, DropdownMenuTrigger as s, Heading as c, Skeleton as l, Table as u, TableBody as d, TableCell as f, TableHead as p, TableHeader as m, TableRow as h, Tooltip as g, TooltipContent as _, TooltipProvider as v, TooltipTrigger as y } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { LoadingRegion as b } from "../../../../shared/ui/dist/lib/LoadingRegion/LoadingRegion.js";
7
+ import "../../../../shared/ui/dist/index.js";
8
+ import { AccountAccessSummaryTable as x } from "./index2.js";
9
+ import { DEFAULT_LABELS as S } from "./index5.js";
10
+ import { AuthorizedSignerBadge as C } from "./index14.js";
11
+ import { useEffect as w, useRef as T } from "react";
12
+ import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
13
+ import { ArrowLeftIcon as k, MoreVertical as A } from "lucide-react";
4
14
  // ../../libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index16.js
5
- function i({ label: i }) {
6
- return /* @__PURE__ */ n(e, {
7
- className: "ttw:shrink-0 ttw:gap-1 ttw:rounded-full ttw:border-transparent ttw:bg-[#EEF4FF] ttw:px-2 ttw:py-0.5 ttw:text-xs ttw:font-medium ttw:text-[#3538CD]",
8
- children: [/* @__PURE__ */ t(r, {
9
- "aria-hidden": !0,
10
- className: "ttw:size-3"
11
- }), i]
15
+ function j({ name: j, email: M, roleCardTitle: N, roleCardDescription: P, isRoleLoading: F = !1, showAuthorizedSignerBadge: I = !1, statusLabel: L, statusTone: R, lastSignInLabel: z, departmentLabel: B, locationLabel: V, reportingManagerName: H, directReports: U = [], accountAccessLabel: W, accountAccessRows: G = [], isAccountAccessLoading: K = !1, onBackClick: q, onEditClick: J, onResendClick: Y, onDeactivateClick: X, labels: Z }) {
16
+ let Q = {
17
+ ...S,
18
+ ...Z
19
+ }, $ = T(null);
20
+ return w(() => {
21
+ $.current?.focus();
22
+ }, []), /* @__PURE__ */ O("section", {
23
+ "aria-label": j,
24
+ className: "ttw:flex ttw:flex-col ttw:gap-6 ttw:rounded-md ttw:border ttw:border-border ttw:bg-card ttw:p-6",
25
+ children: [
26
+ /* @__PURE__ */ O("div", {
27
+ className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-2",
28
+ children: [/* @__PURE__ */ O(t, {
29
+ ref: $,
30
+ variant: "ghost",
31
+ size: "sm",
32
+ onClick: q,
33
+ children: [/* @__PURE__ */ D(k, { className: "ttw:size-4" }), Q.detailsBackButton]
34
+ }), /* @__PURE__ */ O("div", {
35
+ className: "ttw:flex ttw:items-center ttw:gap-2",
36
+ children: [J && /* @__PURE__ */ D(t, {
37
+ variant: "ghost",
38
+ size: "sm",
39
+ onClick: J,
40
+ children: Q.detailsEditButton
41
+ }), (Y || X) && /* @__PURE__ */ O(r, { children: [/* @__PURE__ */ D(v, { children: /* @__PURE__ */ O(g, { children: [/* @__PURE__ */ D(y, {
42
+ asChild: !0,
43
+ children: /* @__PURE__ */ D(s, {
44
+ asChild: !0,
45
+ children: /* @__PURE__ */ D(t, {
46
+ variant: "ghost",
47
+ size: "icon-sm",
48
+ "aria-label": Q.detailsMoreActions,
49
+ children: /* @__PURE__ */ D(A, {
50
+ "aria-hidden": !0,
51
+ className: "ttw:size-4"
52
+ })
53
+ })
54
+ })
55
+ }), /* @__PURE__ */ D(_, { children: Q.detailsMoreActions })] }) }), /* @__PURE__ */ O(i, {
56
+ align: "end",
57
+ children: [
58
+ Y && /* @__PURE__ */ D(a, {
59
+ onClick: Y,
60
+ children: Q.detailsResendButton
61
+ }),
62
+ Y && X && /* @__PURE__ */ D(o, {}),
63
+ X && /* @__PURE__ */ D(a, {
64
+ variant: "destructive",
65
+ onClick: X,
66
+ children: Q.detailsDeactivateButton
67
+ })
68
+ ]
69
+ })] })]
70
+ })]
71
+ }),
72
+ /* @__PURE__ */ D("div", {
73
+ className: "ttw:flex ttw:items-center ttw:gap-3",
74
+ children: /* @__PURE__ */ O("div", {
75
+ className: "ttw:min-w-0",
76
+ children: [/* @__PURE__ */ O("div", {
77
+ className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-x-2 ttw:gap-y-1",
78
+ children: [
79
+ /* @__PURE__ */ D(c, {
80
+ variant: "section",
81
+ level: 3,
82
+ children: j
83
+ }),
84
+ /* @__PURE__ */ D(e, {
85
+ variant: "secondary",
86
+ children: N
87
+ }),
88
+ I && /* @__PURE__ */ D(C, { label: Q.authorizedSignerBadge })
89
+ ]
90
+ }), /* @__PURE__ */ O("div", {
91
+ className: "ttw:mt-1 ttw:flex ttw:items-center ttw:gap-2 ttw:text-sm ttw:text-muted-foreground",
92
+ children: [/* @__PURE__ */ D(e, {
93
+ tone: R,
94
+ children: L
95
+ }), z ? /* @__PURE__ */ O(E, { children: [
96
+ /* @__PURE__ */ D("span", {
97
+ "aria-hidden": !0,
98
+ children: "|"
99
+ }),
100
+ /* @__PURE__ */ D("span", { children: Q.detailsLastSignInLabel }),
101
+ /* @__PURE__ */ D("span", { children: z })
102
+ ] }) : null]
103
+ })]
104
+ })
105
+ }),
106
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(c, {
107
+ variant: "component",
108
+ level: 4,
109
+ className: "ttw:mb-2",
110
+ children: Q.detailsMemberDetailsHeading
111
+ }), /* @__PURE__ */ D(n, { items: [
112
+ {
113
+ label: Q.detailsNameLabel,
114
+ value: j
115
+ },
116
+ {
117
+ label: Q.detailsDepartmentLabel,
118
+ value: B
119
+ },
120
+ {
121
+ label: Q.detailsEmailLabel,
122
+ value: M
123
+ },
124
+ {
125
+ label: Q.detailsLocationLabel,
126
+ value: V
127
+ }
128
+ ] })] }),
129
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(c, {
130
+ variant: "component",
131
+ level: 4,
132
+ className: "ttw:mb-2",
133
+ children: Q.detailsReportingManagerLabel
134
+ }), H ? /* @__PURE__ */ D("div", {
135
+ className: "ttw:flex ttw:items-center ttw:gap-2",
136
+ children: /* @__PURE__ */ D("span", {
137
+ className: "ttw:text-sm ttw:text-foreground",
138
+ children: H
139
+ })
140
+ }) : /* @__PURE__ */ D("p", {
141
+ className: "ttw:text-sm ttw:text-muted-foreground",
142
+ children: Q.detailsReportingManagerNone
143
+ })] }),
144
+ U.length > 0 ? /* @__PURE__ */ D(E, { children: /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(c, {
145
+ variant: "component",
146
+ level: 4,
147
+ className: "ttw:mb-2",
148
+ children: Q.detailsApprovesExpensesHeading
149
+ }), /* @__PURE__ */ D("div", {
150
+ className: "ttw:overflow-hidden ttw:rounded-md ttw:border ttw:border-border",
151
+ children: /* @__PURE__ */ O(u, { children: [/* @__PURE__ */ D(m, { children: /* @__PURE__ */ O(h, {
152
+ className: "ttw:bg-muted/50 ttw:hover:bg-muted/50",
153
+ children: [
154
+ /* @__PURE__ */ D(p, { children: Q.nameColumn }),
155
+ /* @__PURE__ */ D(p, { children: Q.roleColumn }),
156
+ /* @__PURE__ */ D(p, { children: Q.departmentColumn }),
157
+ /* @__PURE__ */ D(p, { children: Q.statusColumn })
158
+ ]
159
+ }) }), /* @__PURE__ */ D(d, { children: U.map((t) => /* @__PURE__ */ O(h, { children: [
160
+ /* @__PURE__ */ D(f, { children: /* @__PURE__ */ D("div", {
161
+ className: "ttw:flex ttw:items-center ttw:gap-3",
162
+ children: /* @__PURE__ */ D("span", {
163
+ className: "ttw:truncate ttw:text-sm ttw:font-medium ttw:text-foreground",
164
+ children: t.name
165
+ })
166
+ }) }),
167
+ /* @__PURE__ */ D(f, { children: /* @__PURE__ */ D(e, {
168
+ variant: "secondary",
169
+ children: t.roleLabel
170
+ }) }),
171
+ /* @__PURE__ */ D(f, {
172
+ className: "ttw:text-muted-foreground",
173
+ children: t.departmentLabel
174
+ }),
175
+ /* @__PURE__ */ D(f, { children: /* @__PURE__ */ D(e, {
176
+ tone: t.statusTone,
177
+ children: t.statusLabel
178
+ }) })
179
+ ] }, t.key)) })] })
180
+ })] }) }) : null,
181
+ /* @__PURE__ */ O("div", { children: [
182
+ /* @__PURE__ */ D(c, {
183
+ variant: "component",
184
+ level: 4,
185
+ className: "ttw:mb-2",
186
+ children: Q.rolesSectionHeading
187
+ }),
188
+ /* @__PURE__ */ D("p", {
189
+ className: "ttw:mb-3 ttw:text-sm ttw:text-muted-foreground",
190
+ children: Q.rolesSectionDescription
191
+ }),
192
+ F ? /* @__PURE__ */ D(b, {
193
+ isLoading: !0,
194
+ loadingLabel: Q.roleLoadingLabel,
195
+ children: /* @__PURE__ */ D(l, {
196
+ "aria-hidden": !0,
197
+ className: "ttw:h-12 ttw:w-full"
198
+ })
199
+ }) : /* @__PURE__ */ D("div", {
200
+ className: "ttw:flex ttw:w-full ttw:flex-col ttw:rounded-lg ttw:bg-muted ttw:p-4",
201
+ children: /* @__PURE__ */ D("span", {
202
+ className: "ttw:flex ttw:w-full ttw:items-start ttw:gap-3",
203
+ children: /* @__PURE__ */ O("span", {
204
+ className: "ttw:flex ttw:min-w-0 ttw:flex-1 ttw:flex-col ttw:gap-1",
205
+ children: [/* @__PURE__ */ D("span", {
206
+ className: "ttw:text-sm ttw:font-semibold ttw:text-foreground",
207
+ children: N
208
+ }), P ? /* @__PURE__ */ D("span", {
209
+ className: "ttw:text-sm ttw:leading-normal ttw:text-muted-foreground",
210
+ children: P
211
+ }) : null]
212
+ })
213
+ })
214
+ })
215
+ ] }),
216
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(c, {
217
+ variant: "component",
218
+ level: 4,
219
+ className: "ttw:mb-2",
220
+ children: Q.detailsAccountAccessLabel
221
+ }), K ? /* @__PURE__ */ D(b, {
222
+ isLoading: !0,
223
+ loadingLabel: Q.roleLoadingLabel,
224
+ children: /* @__PURE__ */ D(l, {
225
+ "aria-hidden": !0,
226
+ className: "ttw:h-12 ttw:w-full"
227
+ })
228
+ }) : G.length > 0 ? /* @__PURE__ */ D(x, {
229
+ rows: G,
230
+ labels: {
231
+ accountNameColumn: Q.accountAccessNameColumn,
232
+ accountNumberColumn: Q.accountAccessNumberColumn,
233
+ accountTypeColumn: Q.accountAccessTypeColumn,
234
+ sourceColumn: Q.accountAccessSourceColumn
235
+ }
236
+ }) : /* @__PURE__ */ D("p", {
237
+ className: "ttw:text-sm ttw:text-muted-foreground",
238
+ children: W
239
+ })] })
240
+ ]
12
241
  });
13
242
  }
14
- export { i as AuthorizedSignerBadge };
243
+ export { j as TeamMemberDetails, j as default };
@@ -2,179 +2,21 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { Badge as e, Button as t, Skeleton as n, Table as r, TableBody as i, TableCell as a, TableHead as o, TableHeader as s, TableRow as c } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
- import { avatarSwatchFor as l } from "../../../../shared/ui/dist/lib/avatarSwatch.js";
7
- import { PaginationFooter as u } from "../../../../shared/ui/dist/lib/PaginationFooter/PaginationFooter.js";
8
- import "../../../../shared/ui/dist/index.js";
9
- import { DEFAULT_LABELS as d } from "./index6.js";
10
- import { statusToneClassName as f } from "./index9.js";
11
- import { AuthorizedSignerBadge as p } from "./index16.js";
12
- import { useEffect as m, useRef as h } from "react";
13
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
14
- import { Building2 as y, Plus as b, UsersIcon as x } from "lucide-react";
5
+ import { Tabs as e, TabsContent as t, TabsList as n, TabsTrigger as r } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
15
7
  // ../../libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index17.js
16
- var S = [
17
- 5,
18
- 10,
19
- 25
20
- ], C = 4;
21
- function w() {
22
- return /* @__PURE__ */ _(g, { children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ v(c, { children: [
23
- /* @__PURE__ */ _(a, { children: /* @__PURE__ */ v("div", {
24
- className: "ttw:flex ttw:items-center ttw:gap-2",
25
- children: [/* @__PURE__ */ _(n, { className: "ttw:size-8 ttw:rounded-full" }), /* @__PURE__ */ v("div", {
26
- className: "ttw:flex-1 ttw:space-y-2",
27
- children: [/* @__PURE__ */ _(n, { className: "ttw:h-4 ttw:w-32" }), /* @__PURE__ */ _(n, { className: "ttw:h-3 ttw:w-44" })]
28
- })]
29
- }) }),
30
- /* @__PURE__ */ _(a, { children: /* @__PURE__ */ _(n, { className: "ttw:h-4 ttw:w-20" }) }),
31
- /* @__PURE__ */ _(a, { children: /* @__PURE__ */ _(n, { className: "ttw:h-4 ttw:w-24" }) }),
32
- /* @__PURE__ */ _(a, { children: /* @__PURE__ */ _(n, { className: "ttw:h-4 ttw:w-16" }) })
33
- ] }, t)) });
34
- }
35
- function T({ title: e, description: t }) {
36
- return /* @__PURE__ */ _(c, {
37
- className: "ttw:hover:bg-transparent",
38
- children: /* @__PURE__ */ _(a, {
39
- colSpan: C,
40
- className: "ttw:p-0",
41
- children: /* @__PURE__ */ v("div", {
42
- className: "ttw:flex ttw:flex-col ttw:items-center ttw:justify-center ttw:px-4 ttw:py-14 ttw:text-center",
43
- children: [
44
- /* @__PURE__ */ _("div", {
45
- className: "ttw:mb-4 ttw:flex ttw:size-14 ttw:items-center ttw:justify-center ttw:rounded-2xl ttw:bg-muted",
46
- children: /* @__PURE__ */ _(x, { className: "ttw:size-6 ttw:text-muted-foreground" })
47
- }),
48
- /* @__PURE__ */ _("h3", {
49
- className: "ttw:mb-2 ttw:text-lg ttw:font-bold ttw:tracking-tight ttw:text-foreground",
50
- children: e
51
- }),
52
- /* @__PURE__ */ _("p", {
53
- className: "ttw:max-w-sm ttw:text-sm ttw:text-muted-foreground",
54
- children: t
55
- })
56
- ]
57
- })
58
- })
59
- });
60
- }
61
- function E({ rows: n, isLoading: x = !1, isError: C = !1, showPagination: E = !1, isPreviousPageDisabled: D = !1, isNextPageDisabled: O = !1, pageSize: k = 10, pageSizeOptions: A = S, rangeLabel: j = "", onPageSizeChange: M, autoFocusRowKey: N, onPreviousPageClick: P, onNextPageClick: F, onInviteClick: I, labels: L }) {
62
- let R = {
63
- ...d,
64
- ...L
65
- }, z = h(null);
66
- return m(() => {
67
- if (!N) return;
68
- let e = z.current;
69
- e && (e.querySelector(`button[data-row-key="${CSS.escape(N)}"]`) ?? e).focus();
70
- }, [N]), /* @__PURE__ */ v("section", {
71
- ref: z,
72
- tabIndex: -1,
73
- "aria-label": R.title,
74
- "aria-busy": x || void 0,
75
- className: "ttw:overflow-hidden ttw:rounded-md",
76
- children: [
77
- x && /* @__PURE__ */ _("span", {
78
- role: "status",
79
- className: "ttw:sr-only",
80
- children: R.loadingLabel
81
- }),
82
- I && /* @__PURE__ */ _("div", {
83
- className: "ttw:flex ttw:items-center ttw:justify-end ttw:gap-4 ttw:border-b ttw:border-border ttw:p-3",
84
- children: /* @__PURE__ */ v(t, {
85
- size: "sm",
86
- disabled: x,
87
- onClick: I,
88
- children: [/* @__PURE__ */ _(b, {
89
- "aria-hidden": !0,
90
- className: "ttw:size-4"
91
- }), R.inviteButton]
92
- })
93
- }),
94
- /* @__PURE__ */ v(r, { children: [/* @__PURE__ */ _(s, { children: /* @__PURE__ */ v(c, {
95
- className: "ttw:hover:bg-transparent",
96
- children: [
97
- /* @__PURE__ */ _(o, { children: R.nameColumn }),
98
- /* @__PURE__ */ _(o, { children: R.roleColumn }),
99
- /* @__PURE__ */ _(o, { children: R.departmentColumn }),
100
- /* @__PURE__ */ _(o, { children: R.statusColumn })
101
- ]
102
- }) }), /* @__PURE__ */ _(i, { children: C ? /* @__PURE__ */ _(T, {
103
- title: R.errorTitle,
104
- description: R.errorDescription
105
- }) : x ? /* @__PURE__ */ _(w, {}) : n.length === 0 ? /* @__PURE__ */ _(T, {
106
- title: R.emptyTitle,
107
- description: R.emptyDescription
108
- }) : n.map((t) => {
109
- let n = /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("span", {
110
- "aria-hidden": !0,
111
- className: `ttw:flex ttw:size-8 ttw:shrink-0 ttw:items-center ttw:justify-center ttw:rounded-full ttw:text-xs ttw:font-semibold ${l(t.email)}`,
112
- children: t.initials
113
- }), /* @__PURE__ */ v("div", {
114
- className: "ttw:min-w-0 ttw:flex-1",
115
- children: [/* @__PURE__ */ v("div", {
116
- className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-x-2 ttw:gap-y-1",
117
- children: [/* @__PURE__ */ _("span", {
118
- className: "ttw:text-sm ttw:font-medium ttw:text-foreground",
119
- children: t.name
120
- }), t.showAuthorizedSignerBadge && /* @__PURE__ */ _(p, { label: R.authorizedSignerBadge })]
121
- }), /* @__PURE__ */ _("div", {
122
- className: "ttw:truncate ttw:text-sm ttw:text-muted-foreground",
123
- children: t.email
124
- })]
125
- })] });
126
- return /* @__PURE__ */ v(c, {
127
- "data-testid": `team-member-row-${t.key}`,
128
- className: t.isInactive ? "ttw:cursor-default ttw:opacity-50 ttw:hover:bg-transparent" : "ttw:cursor-pointer",
129
- onClick: t.isInactive ? void 0 : () => t.onSelect(),
130
- children: [
131
- /* @__PURE__ */ _(a, { children: t.isInactive ? /* @__PURE__ */ _("div", {
132
- className: "ttw:flex ttw:w-full ttw:max-w-md ttw:items-center ttw:gap-2",
133
- children: n
134
- }) : /* @__PURE__ */ _("button", {
135
- type: "button",
136
- "data-row-key": t.key,
137
- onClick: (e) => {
138
- e.stopPropagation(), t.onSelect();
139
- },
140
- className: "ttw:flex ttw:w-full ttw:max-w-md ttw:items-center ttw:gap-2 ttw:rounded-md ttw:text-left ttw:outline-none ttw:focus-visible:ring-2 ttw:focus-visible:ring-ring ttw:focus-visible:ring-offset-2",
141
- children: n
142
- }) }),
143
- /* @__PURE__ */ _(a, { children: t.isInactive ? /* @__PURE__ */ _("span", {
144
- className: "ttw:text-sm ttw:font-medium ttw:text-muted-foreground",
145
- children: R.inactiveRolePlaceholder
146
- }) : /* @__PURE__ */ _(e, {
147
- variant: "outline",
148
- className: "ttw:rounded ttw:border-[#D0D5DD] ttw:font-medium ttw:text-[#344054]",
149
- children: t.roleLabel
150
- }) }),
151
- /* @__PURE__ */ _(a, { children: /* @__PURE__ */ v("div", {
152
- className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-sm ttw:font-medium ttw:text-[#344054]",
153
- children: [/* @__PURE__ */ _(y, {
154
- "aria-hidden": !0,
155
- className: "ttw:size-4 ttw:shrink-0 ttw:text-[#98A2B3]"
156
- }), /* @__PURE__ */ _("span", { children: t.departmentLabel })]
157
- }) }),
158
- /* @__PURE__ */ _(a, { children: /* @__PURE__ */ _(e, {
159
- className: f(t.statusTone),
160
- children: t.statusLabel
161
- }) })
162
- ]
163
- }, t.key);
164
- }) })] }),
165
- E && /* @__PURE__ */ _(u, {
166
- pageSize: k,
167
- pageSizeOptions: A,
168
- rangeLabel: j,
169
- isPreviousDisabled: D,
170
- isNextDisabled: O,
171
- isDisabled: x,
172
- onPageSizeChange: M ?? (() => void 0),
173
- onPreviousPageClick: P,
174
- onNextPageClick: F,
175
- labels: R
176
- })
177
- ]
8
+ function o({ tabs: o, activeTabId: s, onTabChange: c, children: l }) {
9
+ return /* @__PURE__ */ a(e, {
10
+ value: s,
11
+ onValueChange: c,
12
+ className: "ttw:flex ttw:w-full ttw:flex-col ttw:gap-4",
13
+ children: [/* @__PURE__ */ i(n, { children: o.map((e) => /* @__PURE__ */ i(r, {
14
+ value: e.id,
15
+ children: e.label
16
+ }, e.id)) }), /* @__PURE__ */ i(t, {
17
+ value: s,
18
+ children: l
19
+ })]
178
20
  });
179
21
  }
180
- export { E as TeamMembersTable, E as default };
22
+ export { o as TeamTabs, o as default };
@@ -2,16 +2,44 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { jsx as e } from "react/jsx-runtime";
6
- import { LandmarkIcon as t, Link2Icon as n } from "lucide-react";
5
+ import { Badge as e, Table as t, TableBody as n, TableCell as r, TableHead as i, TableHeader as a, TableRow as o } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
7
7
  // ../../libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index2.js
8
- function r({ source: r }) {
9
- return /* @__PURE__ */ e("span", {
10
- className: `ttw:flex ttw:size-8 ttw:shrink-0 ttw:items-center ttw:justify-center ttw:rounded-md ${r === "internal" ? "ttw:bg-primary/10 ttw:text-primary" : "ttw:bg-muted ttw:text-muted-foreground"}`,
11
- children: /* @__PURE__ */ e(r === "internal" ? t : n, {
12
- "aria-hidden": !0,
13
- className: "ttw:size-4"
14
- })
8
+ function l({ rows: l, labels: u, emptyMessage: d }) {
9
+ return l.length === 0 ? d ? /* @__PURE__ */ s("p", {
10
+ className: "ttw:text-sm ttw:text-muted-foreground",
11
+ children: d
12
+ }) : null : /* @__PURE__ */ s("div", {
13
+ className: "ttw:overflow-hidden ttw:rounded-md ttw:border ttw:border-border",
14
+ children: /* @__PURE__ */ c(t, { children: [/* @__PURE__ */ s(a, { children: /* @__PURE__ */ c(o, {
15
+ className: "ttw:bg-muted/50 ttw:hover:bg-muted/50",
16
+ children: [
17
+ /* @__PURE__ */ s(i, { children: u.accountNameColumn }),
18
+ /* @__PURE__ */ s(i, { children: u.accountNumberColumn }),
19
+ /* @__PURE__ */ s(i, { children: u.accountTypeColumn }),
20
+ /* @__PURE__ */ s(i, { children: u.sourceColumn })
21
+ ]
22
+ }) }), /* @__PURE__ */ s(n, { children: l.map((t) => /* @__PURE__ */ c(o, { children: [
23
+ /* @__PURE__ */ s(r, { children: /* @__PURE__ */ s("div", {
24
+ className: "ttw:flex ttw:items-center ttw:gap-3",
25
+ children: /* @__PURE__ */ s("span", {
26
+ className: "ttw:truncate ttw:text-sm ttw:font-medium ttw:text-foreground",
27
+ children: t.name
28
+ })
29
+ }) }),
30
+ /* @__PURE__ */ s(r, {
31
+ className: "ttw:font-mono ttw:tracking-[0.125rem] ttw:text-muted-foreground",
32
+ children: t.maskedNumber
33
+ }),
34
+ /* @__PURE__ */ s(r, {
35
+ className: "ttw:text-muted-foreground",
36
+ children: t.typeLabel
37
+ }),
38
+ /* @__PURE__ */ s(r, { children: /* @__PURE__ */ s(e, {
39
+ variant: "secondary",
40
+ children: t.sourceLabel
41
+ }) })
42
+ ] }, t.value)) })] })
15
43
  });
16
44
  }
17
- export { r as AccountSourceIcon };
45
+ export { l as AccountAccessSummaryTable, l as default };
@@ -1,47 +1,6 @@
1
- "use client";
2
- "use client";
3
- "use client";
4
- "use client";
5
- import { Badge as e, Table as t, TableBody as n, TableCell as r, TableHead as i, TableHeader as a, TableRow as o } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
- import { AccountSourceIcon as s } from "./index2.js";
7
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
8
1
  // ../../libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index3.js
9
- function u({ rows: u, labels: d, emptyMessage: f }) {
10
- return u.length === 0 ? f ? /* @__PURE__ */ c("p", {
11
- className: "ttw:text-sm ttw:text-muted-foreground",
12
- children: f
13
- }) : null : /* @__PURE__ */ c("div", {
14
- className: "ttw:overflow-hidden ttw:rounded-md ttw:border ttw:border-border",
15
- children: /* @__PURE__ */ l(t, { children: [/* @__PURE__ */ c(a, { children: /* @__PURE__ */ l(o, {
16
- className: "ttw:bg-muted/50 ttw:hover:bg-muted/50",
17
- children: [
18
- /* @__PURE__ */ c(i, { children: d.accountNameColumn }),
19
- /* @__PURE__ */ c(i, { children: d.accountNumberColumn }),
20
- /* @__PURE__ */ c(i, { children: d.accountTypeColumn }),
21
- /* @__PURE__ */ c(i, { children: d.sourceColumn })
22
- ]
23
- }) }), /* @__PURE__ */ c(n, { children: u.map((t) => /* @__PURE__ */ l(o, { children: [
24
- /* @__PURE__ */ c(r, { children: /* @__PURE__ */ l("div", {
25
- className: "ttw:flex ttw:items-center ttw:gap-3",
26
- children: [/* @__PURE__ */ c(s, { source: t.source }), /* @__PURE__ */ c("span", {
27
- className: "ttw:truncate ttw:text-sm ttw:font-medium ttw:text-foreground",
28
- children: t.name
29
- })]
30
- }) }),
31
- /* @__PURE__ */ c(r, {
32
- className: "ttw:font-mono ttw:tracking-[0.125rem] ttw:text-muted-foreground",
33
- children: t.maskedNumber
34
- }),
35
- /* @__PURE__ */ c(r, {
36
- className: "ttw:text-muted-foreground",
37
- children: t.typeLabel
38
- }),
39
- /* @__PURE__ */ c(r, { children: /* @__PURE__ */ c(e, {
40
- variant: "secondary",
41
- className: t.source === "internal" ? "ttw:border-transparent ttw:bg-primary/10 ttw:text-primary" : "ttw:border-transparent ttw:bg-muted ttw:text-muted-foreground",
42
- children: t.sourceLabel
43
- }) })
44
- ] }, t.value)) })] })
45
- });
46
- }
47
- export { u as AccountAccessSummaryTable, u as default };
2
+ var e = {
3
+ internal: "Internal",
4
+ external: "External"
5
+ };
6
+ export { e as DEFAULT_SOURCE_LABELS };