@tesouro/embedded-components-react 0.11.59 → 0.11.60

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 (46) hide show
  1. package/README.md +16 -16
  2. package/dist/index.css +40 -70
  3. package/dist/index.d.ts +19 -6
  4. package/dist/lib/CardDetailsWidget.d.ts +11 -3
  5. package/dist/lib/CreditCardsWidget.d.ts +19 -6
  6. package/dist/lib/DebitCardsWidget.d.ts +19 -6
  7. package/dist/lib/WidgetSuite.d.ts +19 -6
  8. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/lib/CardDetailsWidget.js +112 -110
  9. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/lib/cardDetailsView.js +1 -0
  10. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/index.js +0 -2
  11. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/ActivateCardPanel.js +94 -83
  12. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/ActivateCardSuccessView.js +32 -31
  13. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/labels.js +5 -2
  14. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardCredentialRow.js +41 -23
  15. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardCredentialsFace.js +3 -0
  16. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardDetailsHeader.js +30 -25
  17. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardDetailsPanel.js +162 -190
  18. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardFace.js +2 -2
  19. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CopyButton.js +35 -0
  20. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CopyableValue.js +18 -0
  21. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/NicknameEditor.js +43 -0
  22. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/cardFaceSurface.js +1 -1
  23. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/labels.js +12 -8
  24. package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/feature/dist/index5.js +3 -3
  25. package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/feature/dist/index8.js +110 -104
  26. package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/CreateCardWidget.js +74 -68
  27. package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/PreparingView.js +19 -18
  28. package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/SetupView.js +110 -108
  29. package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/SuccessView.js +33 -42
  30. package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/labels.js +10 -7
  31. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/lib/labels.js +1 -0
  32. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/lib/testIds.js +2 -6
  33. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/lib/useCardsWidget.js +159 -145
  34. package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/index.js +0 -1
  35. package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +255 -112
  36. package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsListDetailsSheet.js +1 -1
  37. package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/labels.js +4 -4
  38. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  39. package/package.json +1 -1
  40. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/AddressLine.js +0 -22
  41. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/DetailCopyRow.js +0 -28
  42. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/NicknameRow.js +0 -64
  43. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/statusBadge.js +0 -11
  44. package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardFaceSwatch.js +0 -11
  45. package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsListRow.js +0 -103
  46. package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/statusBadge.js +0 -11
@@ -2,134 +2,277 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { Button as e, Skeleton as t, Switch 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 { EmptyState as l } from "../../../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
7
- import { ErrorState as u } from "../../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
8
- import { PaginationFooter as d } from "../../../../../shared/ui/dist/lib/PaginationFooter/PaginationFooter.js";
5
+ import { Badge as e, Button as t, DataTable as n, Switch as r, TablePagination as i, cn as a } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { EmptyState as o } from "../../../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
7
+ import { ErrorState as s } from "../../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
9
8
  import "../../../../../shared/ui/dist/index.js";
10
- import { resolveCardsListLabels as f } from "./labels.js";
11
- import { CardsListRow as p } from "./CardsListRow.js";
12
- import { useId as m, useMemo as h } from "react";
13
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
14
- import { CreditCardIcon as y, PlusIcon as b } from "lucide-react";
9
+ import { resolveCardsListLabels as c } from "./labels.js";
10
+ import { useId as l, useMemo as u } from "react";
11
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
12
+ import { CreditCardIcon as p } from "lucide-react";
15
13
  // ../../libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js
16
- var x = [
14
+ var m = [
17
15
  10,
18
16
  25,
19
17
  50
20
- ], S = 5;
21
- function C({ columnCount: e }) {
22
- return /* @__PURE__ */ _(g, { children: Array.from({ length: S }).map((n, r) => /* @__PURE__ */ _(c, {
23
- className: "ttw:h-18",
24
- children: Array.from({ length: e }).map((e, n) => /* @__PURE__ */ _(a, { children: /* @__PURE__ */ _(t, { className: "ttw:h-4 ttw:w-24" }) }, n))
25
- }, r)) });
18
+ ], h = [], g = () => void 0, _ = {
19
+ cardName: 260,
20
+ fundingAccount: 220
21
+ };
22
+ function v({ row: e, labels: t, isClickable: n }) {
23
+ return /* @__PURE__ */ f("span", {
24
+ className: "ttw:flex ttw:min-w-0 ttw:flex-col ttw:gap-0.5",
25
+ children: [/* @__PURE__ */ f("span", {
26
+ className: "ttw:flex ttw:gap-1 ttw:text-sm",
27
+ children: [
28
+ /* @__PURE__ */ d("span", {
29
+ className: a("ttw:truncate ttw:font-medium", n ? "ttw:text-primary" : "ttw:text-foreground"),
30
+ children: e.nickname
31
+ }),
32
+ /* @__PURE__ */ d("span", {
33
+ className: "ttw:text-muted-foreground",
34
+ "aria-hidden": !0,
35
+ children: t.cardNameSeparator
36
+ }),
37
+ /* @__PURE__ */ d("span", {
38
+ className: "ttw:font-normal ttw:text-muted-foreground",
39
+ children: e.lastFour
40
+ })
41
+ ]
42
+ }), /* @__PURE__ */ d("span", {
43
+ className: "ttw:truncate ttw:text-xs ttw:font-normal ttw:text-muted-foreground",
44
+ children: e.typeLabel
45
+ })]
46
+ });
47
+ }
48
+ function y({ row: e, labels: t }) {
49
+ return /* @__PURE__ */ f("span", {
50
+ className: "ttw:flex ttw:min-w-0 ttw:items-baseline ttw:gap-1 ttw:text-sm ttw:font-normal",
51
+ children: [/* @__PURE__ */ d("span", {
52
+ className: "ttw:truncate ttw:text-foreground",
53
+ children: e.fundingAccount
54
+ }), e.fundingAccountLastFour && /* @__PURE__ */ f("span", {
55
+ className: "ttw:shrink-0 ttw:text-muted-foreground",
56
+ children: [
57
+ t.cardNameSeparator,
58
+ " ",
59
+ e.fundingAccountLastFour
60
+ ]
61
+ })]
62
+ });
63
+ }
64
+ function b({ row: e, labels: t }) {
65
+ return e.limit ? /* @__PURE__ */ f("span", {
66
+ className: "ttw:text-sm ttw:tabular-nums",
67
+ children: [/* @__PURE__ */ d("span", {
68
+ className: "ttw:text-foreground",
69
+ children: e.limit
70
+ }), e.limitPeriod && /* @__PURE__ */ f("span", {
71
+ className: "ttw:font-normal ttw:text-muted-foreground",
72
+ children: [" ", e.limitPeriod]
73
+ })]
74
+ }) : /* @__PURE__ */ d("span", {
75
+ className: "ttw:text-sm ttw:font-normal ttw:text-muted-foreground",
76
+ children: t.noLimit
77
+ });
78
+ }
79
+ function x({ row: t }) {
80
+ return /* @__PURE__ */ d(e, {
81
+ tone: t.statusTone,
82
+ children: t.statusLabel
83
+ });
26
84
  }
27
- function w({ rows: t, columns: g, isLoading: S = !1, isError: w = !1, canToggleShowMyCards: T = !1, isShowingMyCards: E = !0, onShowMyCardsChange: D, canCreateCard: O = !1, onCreateCardClick: k, headerStart: A, onRetry: j, isPaginationVisible: M = !1, pageSize: N = 10, pageSizeOptions: P = x, rangeLabel: F = "", isPreviousPageDisabled: I = !1, isNextPageDisabled: L = !1, onPageSizeChange: R, onPreviousPageClick: z, onNextPageClick: B, labels: V, testIds: H }) {
28
- let U = m(), W = h(() => f(V), [V]), G = !!(O && k), K = R && z && B ? {
29
- onPageSizeChange: R,
30
- onPreviousPageClick: z,
31
- onNextPageClick: B
32
- } : void 0, q = g.length + 1;
33
- return /* @__PURE__ */ v("section", {
34
- "aria-label": W.regionLabel,
35
- "aria-busy": S || void 0,
36
- "data-testid": H?.root,
85
+ function S({ row: e, labels: n }) {
86
+ return e.onActivate ? /* @__PURE__ */ d(t, {
87
+ size: "sm",
88
+ variant: "outline",
89
+ "aria-label": `${n.activateButtonForCard} ${e.nickname}`,
90
+ onClick: (t) => {
91
+ t.stopPropagation(), e.onActivate?.();
92
+ },
93
+ children: n.activateButton
94
+ }) : null;
95
+ }
96
+ function C(e, t, n) {
97
+ let r = {
98
+ cardName: (e) => /* @__PURE__ */ d(v, {
99
+ row: e,
100
+ labels: t,
101
+ isClickable: n
102
+ }),
103
+ fundingAccount: (e) => /* @__PURE__ */ d(y, {
104
+ row: e,
105
+ labels: t
106
+ }),
107
+ cardholder: (e) => /* @__PURE__ */ d("span", {
108
+ className: "ttw:text-sm ttw:font-normal ttw:text-foreground",
109
+ children: e.cardholder
110
+ }),
111
+ status: (e) => /* @__PURE__ */ d(x, { row: e }),
112
+ limit: (e) => /* @__PURE__ */ d("div", {
113
+ className: "ttw:text-right",
114
+ children: /* @__PURE__ */ d(b, {
115
+ row: e,
116
+ labels: t
117
+ })
118
+ })
119
+ };
120
+ return [...e.map((e) => ({
121
+ id: e,
122
+ size: _[e],
123
+ header: () => e === "limit" ? /* @__PURE__ */ d("div", {
124
+ className: "ttw:text-right",
125
+ children: t.columnHeaders[e]
126
+ }) : t.columnHeaders[e],
127
+ cell: ({ row: t }) => r[e](t.original)
128
+ })), {
129
+ id: "actions",
130
+ header: () => /* @__PURE__ */ d("span", {
131
+ className: "ttw:sr-only",
132
+ children: t.rowActionsColumn
133
+ }),
134
+ cell: ({ row: e }) => /* @__PURE__ */ d("div", {
135
+ className: "ttw:text-right",
136
+ children: /* @__PURE__ */ d(S, {
137
+ row: e.original,
138
+ labels: t
139
+ })
140
+ })
141
+ }];
142
+ }
143
+ function w({ row: e, columns: t, labels: n, isClickable: r }) {
144
+ return /* @__PURE__ */ f("div", {
145
+ className: "ttw:flex ttw:flex-col ttw:gap-2",
37
146
  children: [
38
- (G || A) && /* @__PURE__ */ v("header", {
39
- className: "ttw:mb-5 ttw:flex ttw:items-center ttw:gap-4",
40
- children: [A, G && /* @__PURE__ */ v(e, {
147
+ /* @__PURE__ */ f("div", {
148
+ className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-2",
149
+ children: [/* @__PURE__ */ d(v, {
150
+ row: e,
151
+ labels: n,
152
+ isClickable: r
153
+ }), t.includes("status") && /* @__PURE__ */ d(x, { row: e })]
154
+ }),
155
+ t.includes("cardholder") && /* @__PURE__ */ d("span", {
156
+ className: "ttw:text-sm ttw:text-foreground",
157
+ children: e.cardholder
158
+ }),
159
+ t.includes("fundingAccount") && /* @__PURE__ */ d(y, {
160
+ row: e,
161
+ labels: n
162
+ }),
163
+ /* @__PURE__ */ f("div", {
164
+ className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-2",
165
+ children: [t.includes("limit") ? /* @__PURE__ */ d(b, {
166
+ row: e,
167
+ labels: n
168
+ }) : null, /* @__PURE__ */ d(S, {
169
+ row: e,
170
+ labels: n
171
+ })]
172
+ })
173
+ ]
174
+ });
175
+ }
176
+ function T({ rows: e, columns: a, isLoading: _ = !1, isError: v = !1, canToggleShowMyCards: y = !1, isShowingMyCards: b = !0, onShowMyCardsChange: x, canCreateCard: S = !1, onCreateCardClick: T, headerStart: E, onRetry: D, isPaginationVisible: O = !1, pageSize: k = 10, pageSizeOptions: A = m, rangeLabel: j = "", isPreviousPageDisabled: M = !1, isNextPageDisabled: N = !1, onPageSizeChange: P, onPreviousPageClick: F, onNextPageClick: I, labels: L, testIds: R }) {
177
+ let z = l(), B = u(() => c(L), [L]), V = e.length > 0 && e.every((e) => e.onSelect !== void 0), H = u(() => C(a, B, V), [
178
+ a,
179
+ B,
180
+ V
181
+ ]), U = !!(S && T), W = !_ && !v && e.length === 0, G = U && !W, K = !!(O && P && F && I), q = V ? {
182
+ onRowClick: (e) => e.onSelect?.(),
183
+ rowAriaLabel: (e) => `${B.selectCardButton} ${e.nickname} ${e.lastFour} ${e.typeLabel}`
184
+ } : {};
185
+ return /* @__PURE__ */ f("section", {
186
+ "aria-label": B.regionLabel,
187
+ "aria-busy": _ || void 0,
188
+ "data-testid": R?.root,
189
+ className: "ttw:flex ttw:flex-col ttw:gap-4",
190
+ children: [
191
+ (G || E) && /* @__PURE__ */ f("header", {
192
+ className: "ttw:flex ttw:items-center ttw:gap-4",
193
+ children: [E, G && /* @__PURE__ */ d(t, {
41
194
  size: "sm",
42
- disabled: S,
43
- onClick: k,
195
+ disabled: _,
196
+ onClick: T,
44
197
  className: "ttw:ml-auto",
45
- children: [/* @__PURE__ */ _(b, {
46
- "aria-hidden": !0,
47
- className: "ttw:size-4"
48
- }), W.createCardButton]
198
+ children: B.createCardButton
49
199
  })]
50
200
  }),
51
- S && /* @__PURE__ */ _("span", {
52
- role: "status",
53
- className: "ttw:sr-only",
54
- children: W.loadingLabel
55
- }),
56
- T && D && /* @__PURE__ */ v("div", {
57
- className: "ttw:mb-4 ttw:flex ttw:items-center ttw:gap-3",
58
- children: [/* @__PURE__ */ _(n, {
59
- checked: E,
60
- disabled: S,
61
- onCheckedChange: D,
62
- "aria-labelledby": U
63
- }), /* @__PURE__ */ _("span", {
64
- id: U,
201
+ y && x && /* @__PURE__ */ f("div", {
202
+ className: "ttw:flex ttw:items-center ttw:gap-2",
203
+ children: [/* @__PURE__ */ d(r, {
204
+ checked: b,
205
+ disabled: _,
206
+ onCheckedChange: x,
207
+ "aria-labelledby": z
208
+ }), /* @__PURE__ */ d("span", {
209
+ id: z,
65
210
  className: "ttw:text-sm ttw:font-medium ttw:text-foreground",
66
- children: W.showMyCardsToggle
211
+ children: B.showMyCardsToggle
67
212
  })]
68
213
  }),
69
- /* @__PURE__ */ v("div", {
70
- className: "ttw:overflow-hidden ttw:rounded-md ttw:border ttw:border-border ttw:bg-card",
71
- children: [/* @__PURE__ */ v(r, { children: [/* @__PURE__ */ _(s, { children: /* @__PURE__ */ v(c, {
72
- className: "ttw:hover:bg-transparent",
73
- children: [g.map((e) => /* @__PURE__ */ _(o, {
74
- className: "ttw:text-sm",
75
- children: W.columnHeaders[e]
76
- }, e)), /* @__PURE__ */ _(o, {
77
- className: "ttw:w-[90px]",
78
- children: /* @__PURE__ */ _("span", {
79
- className: "ttw:sr-only",
80
- children: W.rowActionsColumn
81
- })
82
- })]
83
- }) }), /* @__PURE__ */ _(i, { children: w ? /* @__PURE__ */ _(c, {
84
- className: "ttw:hover:bg-transparent",
85
- children: /* @__PURE__ */ _(a, {
86
- colSpan: q,
87
- className: "ttw:p-0",
88
- children: /* @__PURE__ */ _(u, {
89
- title: W.errorTitle,
90
- description: W.errorDescription,
91
- retryLabel: W.retryButton,
92
- onRetry: j,
93
- testId: H?.error
94
- })
95
- })
96
- }) : S ? /* @__PURE__ */ _(C, { columnCount: q }) : t.length === 0 ? /* @__PURE__ */ _(c, {
97
- className: "ttw:hover:bg-transparent",
98
- children: /* @__PURE__ */ _(a, {
99
- colSpan: q,
100
- className: "ttw:p-0",
101
- children: /* @__PURE__ */ _(l, {
102
- icon: /* @__PURE__ */ _(y, { className: "ttw:size-6 ttw:text-muted-foreground" }),
103
- title: W.emptyTitle,
104
- description: W.emptyDescription,
105
- actionLabel: G ? W.createCardButton : void 0,
106
- actionIcon: /* @__PURE__ */ _(b, {
107
- "aria-hidden": !0,
108
- className: "ttw:size-4"
109
- }),
110
- onAction: G ? k : void 0,
111
- testId: H?.empty
112
- })
113
- })
114
- }) : t.map((e) => /* @__PURE__ */ _(p, {
115
- testIds: H?.row,
214
+ v || W ? /* @__PURE__ */ f("div", {
215
+ className: "ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card",
216
+ children: [v ? /* @__PURE__ */ d(s, {
217
+ title: B.errorTitle,
218
+ description: B.errorDescription,
219
+ retryLabel: B.retryButton,
220
+ onRetry: D,
221
+ testId: R?.error
222
+ }) : /* @__PURE__ */ d(o, {
223
+ icon: /* @__PURE__ */ d(p, {}),
224
+ title: B.emptyTitle,
225
+ description: B.emptyDescription,
226
+ actionLabel: U ? B.createCardButton : void 0,
227
+ onAction: U ? T : void 0,
228
+ testId: R?.empty
229
+ }), !v && K ? /* @__PURE__ */ d(i, {
230
+ pageSize: k,
231
+ pageSizeOptions: A,
232
+ onPageSizeChange: P,
233
+ pageInfo: j || void 0,
234
+ hasPrevPage: !M,
235
+ hasNextPage: !N,
236
+ onPrevPage: F ?? g,
237
+ onNextPage: I ?? g,
238
+ labels: {
239
+ rowsPerPage: B.pagination.rowsPerPageLabel,
240
+ previousPage: B.pagination.previousPageButton,
241
+ nextPage: B.pagination.nextPageButton
242
+ }
243
+ }) : null]
244
+ }) : /* @__PURE__ */ d(n, {
245
+ columns: H,
246
+ data: e,
247
+ getRowId: (e) => e.key,
248
+ rowTestId: R?.row,
249
+ sorting: h,
250
+ onSortingChange: g,
251
+ isLoading: _,
252
+ showPagination: K,
253
+ pageSize: k,
254
+ pageSizeOptions: A,
255
+ onPageSizeChange: P ?? g,
256
+ pageInfo: j || void 0,
257
+ hasPrevPage: !M && !_,
258
+ hasNextPage: !N && !_,
259
+ onPrevPage: F ?? g,
260
+ onNextPage: I ?? g,
261
+ renderCard: (e) => /* @__PURE__ */ d(w, {
116
262
  row: e,
117
- columns: g,
118
- labels: W
119
- }, e.key)) })] }), M && K && /* @__PURE__ */ _(d, {
120
- pageSize: N,
121
- pageSizeOptions: P,
122
- rangeLabel: F,
123
- isPreviousDisabled: I,
124
- isNextDisabled: L,
125
- isDisabled: S,
126
- onPageSizeChange: K.onPageSizeChange,
127
- onPreviousPageClick: K.onPreviousPageClick,
128
- onNextPageClick: K.onNextPageClick,
129
- labels: W.pagination
130
- })]
263
+ columns: a,
264
+ labels: B,
265
+ isClickable: V
266
+ }),
267
+ labels: {
268
+ loading: B.loadingLabel,
269
+ rowsPerPage: B.pagination.rowsPerPageLabel,
270
+ previousPage: B.pagination.previousPageButton,
271
+ nextPage: B.pagination.nextPageButton
272
+ },
273
+ ...q
131
274
  })
132
275
  ]
133
276
  });
134
277
  }
135
- export { w as CardsList, w as default };
278
+ export { T as CardsList, T as default };
@@ -20,7 +20,7 @@ function l({ isOpen: l, onClose: u, labels: d, contentClassName: f, testIds: p,
20
20
  children: /* @__PURE__ */ c(t, {
21
21
  showCloseButton: !1,
22
22
  "data-testid": p?.root,
23
- className: i("ttw:w-168 ttw:sm:max-w-168", "ttw:!gap-0", f ?? "ttw:overflow-y-auto"),
23
+ className: i("ttw:!gap-0", f ?? "ttw:overflow-y-auto"),
24
24
  children: [
25
25
  /* @__PURE__ */ s(r, {
26
26
  className: "ttw:sr-only",
@@ -19,10 +19,10 @@ var t = {
19
19
  cardNameSeparator: "-",
20
20
  noLimit: "No limit",
21
21
  loadingLabel: "Loading cards",
22
- emptyTitle: "No cards created yet",
23
- emptyDescription: "No cards have been created yet. Click the Create card button to create your first physical or virtual, debit or credit card.",
24
- errorTitle: "Unable to load cards",
25
- errorDescription: "Something went wrong while fetching your cards. Please try again.",
22
+ emptyTitle: "No cards yet",
23
+ emptyDescription: "Create a physical or virtual card to get started.",
24
+ errorTitle: "Couldn't load cards",
25
+ errorDescription: "Check your connection, then try again.",
26
26
  retryButton: "Try again",
27
27
  pagination: e,
28
28
  detailsSheet: {
@@ -1,5 +1,5 @@
1
1
  // ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
2
- var e = "@tesouro/embedded-components-react", t = "0.11.59", n = "dd2e792f0445acb9ddf3e4d98c8b7a1f8b62db13", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.11.60", n = "2666579965b1846bcbaea6be119f0814f3f1a0d1", 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.11.59",
3
+ "version": "0.11.60",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -1,22 +0,0 @@
1
- import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
- import { CopyIcon as n } from "lucide-react";
3
- // ../../libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/AddressLine.js
4
- function r({ value: r, copyAriaLabel: i, onCopy: a }) {
5
- return /* @__PURE__ */ t("div", {
6
- className: "ttw:flex ttw:items-center ttw:gap-1",
7
- children: [/* @__PURE__ */ e("span", {
8
- className: "ttw:min-w-0 ttw:truncate ttw:text-sm ttw:text-foreground",
9
- children: r
10
- }), i && a ? /* @__PURE__ */ e("button", {
11
- type: "button",
12
- "aria-label": i,
13
- onClick: a,
14
- className: "ttw:inline-flex ttw:size-5 ttw:shrink-0 ttw:cursor-pointer ttw:items-center ttw:justify-center ttw:rounded ttw:text-muted-foreground ttw:transition-colors ttw:hover:bg-accent ttw:hover:text-accent-foreground ttw:focus-visible:ring-2 ttw:focus-visible:ring-ring ttw:focus-visible:outline-none",
15
- children: /* @__PURE__ */ e(n, {
16
- className: "ttw:size-3",
17
- "aria-hidden": "true"
18
- })
19
- }) : null]
20
- });
21
- }
22
- export { r as AddressLine };
@@ -1,28 +0,0 @@
1
- import { Button as e } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
- import { CopyIcon as r } from "lucide-react";
4
- // ../../libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/DetailCopyRow.js
5
- function i({ label: i, children: a, copyAriaLabel: o, onCopy: s, trailing: c, isLast: l }) {
6
- return /* @__PURE__ */ n("div", {
7
- className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-3 ttw:px-4 ttw:py-3" + (l ? "" : " ttw:border-b ttw:border-border"),
8
- children: [/* @__PURE__ */ n("div", {
9
- className: "ttw:min-w-0 ttw:space-y-1",
10
- children: [/* @__PURE__ */ t("p", {
11
- className: "ttw:text-sm ttw:font-medium ttw:text-foreground",
12
- children: i
13
- }), /* @__PURE__ */ t("div", {
14
- className: "ttw:text-sm ttw:text-foreground",
15
- children: a
16
- })]
17
- }), c ?? (o && s ? /* @__PURE__ */ t(e, {
18
- type: "button",
19
- variant: "ghost",
20
- size: "icon",
21
- className: "ttw:size-8 ttw:shrink-0 ttw:text-muted-foreground",
22
- "aria-label": o,
23
- onClick: s,
24
- children: /* @__PURE__ */ t(r, { className: "ttw:size-4" })
25
- }) : null)]
26
- });
27
- }
28
- export { i as DetailCopyRow };
@@ -1,64 +0,0 @@
1
- import { Button as e, Input as t, cn as n } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { InlineErrorAlert as r } from "../../../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
3
- import "../../../../../shared/ui/dist/index.js";
4
- import { DetailCopyRow as i } from "./DetailCopyRow.js";
5
- import { useEffect as a, useRef as o } from "react";
6
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
7
- import { SquarePenIcon as l } from "lucide-react";
8
- // ../../libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/NicknameRow.js
9
- function u({ fieldLabels: u, labels: d, nickname: f, editState: p, onEdit: m, draft: h = "", onDraftChange: g, onSave: _, onCancel: v, isSaveDisabled: y, onCopy: b, copyAriaLabel: x, isLast: S }) {
10
- let C = p !== "closed", w = o(null);
11
- return a(() => {
12
- C && w.current?.focus();
13
- }, [C]), m && C ? /* @__PURE__ */ c("div", {
14
- className: n("ttw:flex ttw:flex-col ttw:gap-2 ttw:px-4 ttw:py-3", !S && "ttw:border-b ttw:border-border"),
15
- children: [
16
- /* @__PURE__ */ s("p", {
17
- className: "ttw:text-sm ttw:font-medium ttw:text-foreground",
18
- children: u.nickname
19
- }),
20
- /* @__PURE__ */ s(t, {
21
- ref: w,
22
- value: h,
23
- "aria-label": d.inputAriaLabel,
24
- disabled: p === "saving",
25
- onChange: (e) => g?.(e.target.value)
26
- }),
27
- /* @__PURE__ */ c("div", {
28
- className: "ttw:flex ttw:gap-2",
29
- children: [/* @__PURE__ */ s(e, {
30
- type: "button",
31
- size: "sm",
32
- disabled: y,
33
- loading: p === "saving",
34
- onClick: _,
35
- children: d.save
36
- }), /* @__PURE__ */ s(e, {
37
- type: "button",
38
- size: "sm",
39
- variant: "outline",
40
- disabled: p === "saving",
41
- onClick: v,
42
- children: d.cancel
43
- })]
44
- }),
45
- p === "errored" ? /* @__PURE__ */ s(r, { children: d.errorDescription }) : null
46
- ]
47
- }) : /* @__PURE__ */ s(i, {
48
- label: u.nickname,
49
- copyAriaLabel: x,
50
- onCopy: b,
51
- trailing: m ? /* @__PURE__ */ s(e, {
52
- type: "button",
53
- variant: "ghost",
54
- size: "icon",
55
- className: "ttw:size-8 ttw:shrink-0 ttw:text-muted-foreground",
56
- "aria-label": d.editAriaLabel,
57
- onClick: m,
58
- children: /* @__PURE__ */ s(l, { className: "ttw:size-4" })
59
- }) : void 0,
60
- isLast: S,
61
- children: f ?? u.emptyValue
62
- });
63
- }
64
- export { u as NicknameRow };
@@ -1,11 +0,0 @@
1
- // ../../libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/statusBadge.js
2
- var e = {
3
- success: "ttw:bg-[#ECFDF5] ttw:text-[#027A48]",
4
- info: "ttw:bg-[#EFF8FF] ttw:text-[#175CD3]",
5
- warning: "ttw:bg-[#FFFAEB] ttw:text-[#B54708]",
6
- neutral: "ttw:bg-[#F2F4F7] ttw:text-[#344054]"
7
- }, t = "ttw:rounded ttw:border-transparent ttw:px-2 ttw:py-0.5 ttw:text-xs ttw:font-medium";
8
- function n(n) {
9
- return `${t} ${e[n]}`;
10
- }
11
- export { n as cardStatusToneClassName };
@@ -1,11 +0,0 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- // ../../libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardFaceSwatch.js
3
- function t({ testIds: t }) {
4
- return /* @__PURE__ */ e("span", {
5
- "aria-hidden": !0,
6
- "data-testid": t?.root,
7
- className: "ttw:flex ttw:h-7 ttw:w-[42px] ttw:shrink-0 ttw:items-end ttw:rounded-[3.5px] ttw:bg-foreground ttw:p-1",
8
- children: /* @__PURE__ */ e("span", { className: "ttw:h-1 ttw:w-2.5 ttw:rounded-[1px] ttw:bg-muted-foreground" })
9
- });
10
- }
11
- export { t as CardFaceSwatch, t as default };