@tesouro/embedded-components-react 0.5.281 → 0.5.283

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.
@@ -2,22 +2,291 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
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";
5
+ import { Badge as e, Button as t, Separator as n, Spinner as r, Table as i, TableBody as a, TableCell as o, TableHead as s, TableHeader as c, TableRow as l } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { avatarSwatchFor as u } from "../../../../shared/ui/dist/lib/avatarSwatch.js";
7
+ import "../../../../shared/ui/dist/index.js";
8
+ import { AccountAccessSummaryTable as d } from "./index3.js";
9
+ import { DEFAULT_LABELS as ee } 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 { ArrowLeftIcon as y, Building2 as b, CornerDownRightIcon as x, MailIcon as S, PencilIcon as C, UserXIcon as w } from "lucide-react";
7
15
  //#region ../../libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index18.js
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:w-full ttw:space-y-5",
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
16
+ function T({ label: e, value: t }) {
17
+ return /* @__PURE__ */ v("div", {
18
+ className: "ttw:flex ttw:flex-col ttw:gap-1",
19
+ children: [/* @__PURE__ */ _("dt", {
20
+ className: "ttw:text-sm ttw:text-muted-foreground",
21
+ children: e
22
+ }), /* @__PURE__ */ _("dd", {
23
+ className: "ttw:text-base ttw:text-foreground",
24
+ children: t
19
25
  })]
20
26
  });
21
27
  }
28
+ function E({ name: E, email: D, initials: O, avatarSeed: k, roleCardTitle: A, roleCardDescription: j, roleCardIcon: M, isRoleLoading: N = !1, showAuthorizedSignerBadge: P = !1, statusLabel: F, statusTone: I, lastSignInLabel: L, departmentLabel: R, locationLabel: z, reportingManagerName: B, reportingManagerInitials: V, reportingManagerSeed: H, directReports: U = [], accountAccessLabel: W, accountAccessRows: G = [], isAccountAccessLoading: K = !1, onBackClick: q, onEditClick: J, onResendClick: Y, onDeactivateClick: X, labels: Z }) {
29
+ let Q = {
30
+ ...ee,
31
+ ...Z
32
+ }, $ = h(null);
33
+ return m(() => {
34
+ $.current?.focus();
35
+ }, []), /* @__PURE__ */ v("section", {
36
+ "aria-label": E,
37
+ className: "ttw:rounded-md ttw:border ttw:border-border ttw:bg-card ttw:p-4",
38
+ children: [
39
+ /* @__PURE__ */ v("div", {
40
+ className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-2",
41
+ children: [/* @__PURE__ */ v(t, {
42
+ ref: $,
43
+ variant: "ghost",
44
+ size: "sm",
45
+ onClick: q,
46
+ children: [/* @__PURE__ */ _(y, { className: "ttw:size-4" }), Q.detailsBackButton]
47
+ }), (J || Y || X) && /* @__PURE__ */ v("div", {
48
+ className: "ttw:flex ttw:items-center ttw:gap-2",
49
+ children: [
50
+ Y && /* @__PURE__ */ v(t, {
51
+ variant: "outline",
52
+ size: "sm",
53
+ onClick: Y,
54
+ children: [/* @__PURE__ */ _(S, {
55
+ "aria-hidden": !0,
56
+ className: "ttw:size-4"
57
+ }), Q.detailsResendButton]
58
+ }),
59
+ J && /* @__PURE__ */ v(t, {
60
+ variant: "outline",
61
+ size: "sm",
62
+ onClick: J,
63
+ children: [/* @__PURE__ */ _(C, {
64
+ "aria-hidden": !0,
65
+ className: "ttw:size-4"
66
+ }), Q.detailsEditButton]
67
+ }),
68
+ X && /* @__PURE__ */ v(t, {
69
+ variant: "outline",
70
+ size: "sm",
71
+ className: "ttw:text-destructive ttw:hover:bg-destructive/10 ttw:hover:text-destructive",
72
+ onClick: X,
73
+ children: [/* @__PURE__ */ _(w, {
74
+ "aria-hidden": !0,
75
+ className: "ttw:size-4"
76
+ }), Q.detailsDeactivateButton]
77
+ })
78
+ ]
79
+ })]
80
+ }),
81
+ /* @__PURE__ */ v("div", {
82
+ className: "ttw:mt-4 ttw:flex ttw:items-center ttw:gap-3",
83
+ children: [/* @__PURE__ */ _("span", {
84
+ "aria-hidden": !0,
85
+ className: `ttw:flex ttw:size-12 ttw:shrink-0 ttw:items-center ttw:justify-center ttw:rounded-full ttw:text-sm ttw:font-semibold ${u(k || D || E)}`,
86
+ children: O
87
+ }), /* @__PURE__ */ v("div", {
88
+ className: "ttw:min-w-0",
89
+ children: [/* @__PURE__ */ v("div", {
90
+ className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-x-2 ttw:gap-y-1",
91
+ children: [
92
+ /* @__PURE__ */ _("h3", {
93
+ className: "ttw:text-lg ttw:font-semibold ttw:text-foreground",
94
+ children: E
95
+ }),
96
+ /* @__PURE__ */ _(e, {
97
+ variant: "outline",
98
+ className: "ttw:rounded ttw:border-[#D0D5DD] ttw:font-medium ttw:text-[#344054]",
99
+ children: A
100
+ }),
101
+ P && /* @__PURE__ */ _(p, { label: Q.authorizedSignerBadge })
102
+ ]
103
+ }), /* @__PURE__ */ v("div", {
104
+ className: "ttw:mt-1 ttw:flex ttw:items-center ttw:gap-2 ttw:text-sm ttw:text-muted-foreground",
105
+ children: [/* @__PURE__ */ _(e, {
106
+ className: f(I),
107
+ children: F
108
+ }), L ? /* @__PURE__ */ v(g, { children: [
109
+ /* @__PURE__ */ _("span", {
110
+ "aria-hidden": !0,
111
+ children: "|"
112
+ }),
113
+ /* @__PURE__ */ _("span", { children: Q.detailsLastSignInLabel }),
114
+ /* @__PURE__ */ _("span", { children: L })
115
+ ] }) : null]
116
+ })]
117
+ })]
118
+ }),
119
+ /* @__PURE__ */ _(n, { className: "ttw:my-4" }),
120
+ /* @__PURE__ */ v("div", {
121
+ className: "ttw:mb-4",
122
+ children: [/* @__PURE__ */ _("h4", {
123
+ className: "ttw:mb-3 ttw:text-base ttw:font-semibold ttw:text-foreground",
124
+ children: Q.detailsMemberDetailsHeading
125
+ }), /* @__PURE__ */ v("dl", {
126
+ className: "ttw:grid ttw:grid-cols-1 ttw:gap-4 ttw:sm:grid-cols-2",
127
+ children: [
128
+ /* @__PURE__ */ _(T, {
129
+ label: Q.detailsNameLabel,
130
+ value: E
131
+ }),
132
+ /* @__PURE__ */ _(T, {
133
+ label: Q.detailsDepartmentLabel,
134
+ value: R
135
+ }),
136
+ /* @__PURE__ */ _(T, {
137
+ label: Q.detailsEmailLabel,
138
+ value: D
139
+ }),
140
+ /* @__PURE__ */ _(T, {
141
+ label: Q.detailsLocationLabel,
142
+ value: z
143
+ })
144
+ ]
145
+ })]
146
+ }),
147
+ /* @__PURE__ */ _(n, { className: "ttw:my-4" }),
148
+ /* @__PURE__ */ v("div", {
149
+ className: "ttw:mb-4",
150
+ children: [/* @__PURE__ */ _("h4", {
151
+ className: "ttw:mb-3 ttw:text-base ttw:font-semibold ttw:text-foreground",
152
+ children: Q.detailsReportingManagerLabel
153
+ }), B ? /* @__PURE__ */ v("div", {
154
+ className: "ttw:flex ttw:items-center ttw:gap-2",
155
+ children: [
156
+ /* @__PURE__ */ _(x, {
157
+ "aria-hidden": !0,
158
+ className: "ttw:size-4 ttw:shrink-0 ttw:text-muted-foreground"
159
+ }),
160
+ /* @__PURE__ */ _("span", {
161
+ "aria-hidden": !0,
162
+ className: `ttw:flex ttw:size-8 ttw:shrink-0 ttw:items-center ttw:justify-center ttw:rounded-full ttw:text-xs ttw:font-semibold ${u(H || B)}`,
163
+ children: V
164
+ }),
165
+ /* @__PURE__ */ _("span", {
166
+ className: "ttw:text-sm ttw:text-foreground",
167
+ children: B
168
+ })
169
+ ]
170
+ }) : /* @__PURE__ */ _("p", {
171
+ className: "ttw:text-sm ttw:text-muted-foreground",
172
+ children: Q.detailsReportingManagerNone
173
+ })]
174
+ }),
175
+ U.length > 0 ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(n, { className: "ttw:my-4" }), /* @__PURE__ */ v("div", {
176
+ className: "ttw:mb-4",
177
+ children: [/* @__PURE__ */ _("h4", {
178
+ className: "ttw:mb-3 ttw:text-base ttw:font-semibold ttw:text-foreground",
179
+ children: Q.detailsApprovesExpensesHeading
180
+ }), /* @__PURE__ */ _("div", {
181
+ className: "ttw:overflow-hidden ttw:rounded-md ttw:border ttw:border-border",
182
+ children: /* @__PURE__ */ v(i, { children: [/* @__PURE__ */ _(c, { children: /* @__PURE__ */ v(l, {
183
+ className: "ttw:bg-muted/50 ttw:hover:bg-muted/50",
184
+ children: [
185
+ /* @__PURE__ */ _(s, { children: Q.nameColumn }),
186
+ /* @__PURE__ */ _(s, { children: Q.roleColumn }),
187
+ /* @__PURE__ */ _(s, { children: Q.departmentColumn }),
188
+ /* @__PURE__ */ _(s, { children: Q.statusColumn })
189
+ ]
190
+ }) }), /* @__PURE__ */ _(a, { children: U.map((t) => /* @__PURE__ */ v(l, { children: [
191
+ /* @__PURE__ */ _(o, { children: /* @__PURE__ */ v("div", {
192
+ className: "ttw:flex ttw:items-center ttw:gap-3",
193
+ children: [/* @__PURE__ */ _("span", {
194
+ "aria-hidden": !0,
195
+ className: `ttw:flex ttw:size-8 ttw:shrink-0 ttw:items-center ttw:justify-center ttw:rounded-full ttw:text-xs ttw:font-semibold ${u(t.email)}`,
196
+ children: t.initials
197
+ }), /* @__PURE__ */ _("span", {
198
+ className: "ttw:truncate ttw:text-sm ttw:font-medium ttw:text-foreground",
199
+ children: t.name
200
+ })]
201
+ }) }),
202
+ /* @__PURE__ */ _(o, { children: /* @__PURE__ */ _(e, {
203
+ variant: "outline",
204
+ className: "ttw:rounded ttw:border-[#D0D5DD] ttw:font-medium ttw:text-[#344054]",
205
+ children: t.roleLabel
206
+ }) }),
207
+ /* @__PURE__ */ _(o, {
208
+ className: "ttw:text-muted-foreground",
209
+ children: /* @__PURE__ */ v("span", {
210
+ className: "ttw:flex ttw:items-center ttw:gap-2",
211
+ children: [/* @__PURE__ */ _(b, {
212
+ "aria-hidden": !0,
213
+ className: "ttw:size-4 ttw:shrink-0 ttw:text-muted-foreground"
214
+ }), t.departmentLabel]
215
+ })
216
+ }),
217
+ /* @__PURE__ */ _(o, { children: /* @__PURE__ */ _(e, {
218
+ className: f(t.statusTone),
219
+ children: t.statusLabel
220
+ }) })
221
+ ] }, t.key)) })] })
222
+ })]
223
+ })] }) : null,
224
+ /* @__PURE__ */ _(n, { className: "ttw:my-4" }),
225
+ /* @__PURE__ */ v("div", {
226
+ className: "ttw:mb-4",
227
+ children: [
228
+ /* @__PURE__ */ _("h4", {
229
+ className: "ttw:mb-1 ttw:text-base ttw:font-semibold ttw:text-foreground",
230
+ children: Q.rolesSectionHeading
231
+ }),
232
+ /* @__PURE__ */ _("p", {
233
+ className: "ttw:mb-4 ttw:text-sm ttw:text-muted-foreground",
234
+ children: Q.rolesSectionDescription
235
+ }),
236
+ N ? /* @__PURE__ */ v("div", {
237
+ className: "ttw:flex ttw:items-center ttw:gap-2 ttw:py-2",
238
+ children: [/* @__PURE__ */ _(r, { className: "ttw:size-4" }), /* @__PURE__ */ _("span", {
239
+ className: "ttw:text-sm ttw:text-muted-foreground",
240
+ children: Q.roleLoadingLabel
241
+ })]
242
+ }) : /* @__PURE__ */ _("div", {
243
+ className: "ttw:flex ttw:w-full ttw:flex-col ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card ttw:p-4",
244
+ children: /* @__PURE__ */ v("span", {
245
+ className: "ttw:flex ttw:w-full ttw:items-start ttw:gap-3",
246
+ children: [/* @__PURE__ */ _(M, {
247
+ className: "ttw:mt-0.5 ttw:size-4 ttw:shrink-0 ttw:text-foreground",
248
+ "aria-hidden": !0
249
+ }), /* @__PURE__ */ v("span", {
250
+ className: "ttw:flex ttw:min-w-0 ttw:flex-1 ttw:flex-col ttw:gap-1",
251
+ children: [/* @__PURE__ */ _("span", {
252
+ className: "ttw:text-sm ttw:font-semibold ttw:text-foreground",
253
+ children: A
254
+ }), j ? /* @__PURE__ */ _("span", {
255
+ className: "ttw:text-sm ttw:leading-normal ttw:text-muted-foreground",
256
+ children: j
257
+ }) : null]
258
+ })]
259
+ })
260
+ })
261
+ ]
262
+ }),
263
+ /* @__PURE__ */ _(n, { className: "ttw:my-4" }),
264
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("div", {
265
+ className: "ttw:mb-3 ttw:flex ttw:items-center ttw:justify-between ttw:gap-2",
266
+ children: /* @__PURE__ */ _("h4", {
267
+ className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
268
+ children: Q.detailsAccountAccessLabel
269
+ })
270
+ }), K ? /* @__PURE__ */ v("div", {
271
+ className: "ttw:flex ttw:items-center ttw:gap-2 ttw:py-2",
272
+ children: [/* @__PURE__ */ _(r, { className: "ttw:size-4" }), /* @__PURE__ */ _("span", {
273
+ className: "ttw:text-sm ttw:text-muted-foreground",
274
+ children: Q.roleLoadingLabel
275
+ })]
276
+ }) : G.length > 0 ? /* @__PURE__ */ _(d, {
277
+ rows: G,
278
+ labels: {
279
+ accountNameColumn: Q.accountAccessNameColumn,
280
+ accountNumberColumn: Q.accountAccessNumberColumn,
281
+ accountTypeColumn: Q.accountAccessTypeColumn,
282
+ sourceColumn: Q.accountAccessSourceColumn
283
+ }
284
+ }) : /* @__PURE__ */ _("p", {
285
+ className: "ttw:text-sm ttw:text-muted-foreground",
286
+ children: W
287
+ })] })
288
+ ]
289
+ });
290
+ }
22
291
  //#endregion
23
- export { o as TeamTabs, o as default };
292
+ export { E as TeamMemberDetails, E as default };
@@ -0,0 +1,23 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
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";
7
+ //#region ../../libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index19.js
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:w-full ttw:space-y-5",
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
+ })]
20
+ });
21
+ }
22
+ //#endregion
23
+ export { o as TeamTabs, o as default };
@@ -21,6 +21,7 @@ var e = {
21
21
  detailsRoleLabel: "Role",
22
22
  detailsStatusLabel: "Status",
23
23
  detailsLastSignInLabel: "Last sign in on",
24
+ authorizedSignerBadge: "Authorized signer",
24
25
  detailsDepartmentLabel: "Department",
25
26
  detailsLocationLabel: "Location",
26
27
  detailsReportingManagerLabel: "Reporting manager",
@@ -1,5 +1,5 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
2
- var e = "@tesouro/embedded-components-react", t = "0.5.281", n = "89e9fc42239a64407381e406fe4a16c5ef81c92e", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.5.283", n = "9e75a9f4e3a114037b008e73ec793cd3bfc769ff", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.5.281",
3
+ "version": "0.5.283",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "packageDepSync": {