@tesouro/embedded-components-react 0.11.58 → 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.
- package/README.md +16 -16
- package/dist/index.css +40 -70
- package/dist/index.d.ts +19 -6
- package/dist/lib/CardDetailsWidget.d.ts +11 -3
- package/dist/lib/CreditCardsWidget.d.ts +19 -6
- package/dist/lib/DebitCardsWidget.d.ts +19 -6
- package/dist/lib/WidgetSuite.d.ts +19 -6
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/lib/CardDetailsWidget.js +112 -110
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/lib/cardDetailsView.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/index.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/ActivateCardPanel.js +94 -83
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/ActivateCardSuccessView.js +32 -31
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/labels.js +5 -2
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardCredentialRow.js +41 -23
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardCredentialsFace.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardDetailsHeader.js +30 -25
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardDetailsPanel.js +162 -190
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardFace.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CopyButton.js +35 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CopyableValue.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/NicknameEditor.js +43 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/cardFaceSurface.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/labels.js +12 -8
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/feature/dist/index5.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/feature/dist/index8.js +110 -104
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/CreateCardWidget.js +74 -68
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/PreparingView.js +19 -18
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/SetupView.js +110 -108
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/SuccessView.js +33 -42
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/labels.js +10 -7
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/lib/labels.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/lib/testIds.js +2 -6
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/lib/useCardsWidget.js +159 -145
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/index.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +255 -112
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsListDetailsSheet.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/labels.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/AddressLine.js +0 -22
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/DetailCopyRow.js +0 -28
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/NicknameRow.js +0 -64
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/statusBadge.js +0 -11
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardFaceSwatch.js +0 -11
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsListRow.js +0 -103
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/statusBadge.js +0 -11
package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js
CHANGED
|
@@ -2,134 +2,277 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import { EmptyState as
|
|
7
|
-
import { ErrorState as
|
|
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
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
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
|
|
14
|
+
var m = [
|
|
17
15
|
10,
|
|
18
16
|
25,
|
|
19
17
|
50
|
|
20
|
-
],
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
|
|
39
|
-
className: "ttw:
|
|
40
|
-
children: [
|
|
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:
|
|
43
|
-
onClick:
|
|
195
|
+
disabled: _,
|
|
196
|
+
onClick: T,
|
|
44
197
|
className: "ttw:ml-auto",
|
|
45
|
-
children:
|
|
46
|
-
"aria-hidden": !0,
|
|
47
|
-
className: "ttw:size-4"
|
|
48
|
-
}), W.createCardButton]
|
|
198
|
+
children: B.createCardButton
|
|
49
199
|
})]
|
|
50
200
|
}),
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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:
|
|
211
|
+
children: B.showMyCardsToggle
|
|
67
212
|
})]
|
|
68
213
|
}),
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
-
className: "ttw:
|
|
71
|
-
children: [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
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:
|
|
118
|
-
labels:
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
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 {
|
|
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
|
|
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",
|
package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/labels.js
CHANGED
|
@@ -19,10 +19,10 @@ var t = {
|
|
|
19
19
|
cardNameSeparator: "-",
|
|
20
20
|
noLimit: "No limit",
|
|
21
21
|
loadingLabel: "Loading cards",
|
|
22
|
-
emptyTitle: "No cards
|
|
23
|
-
emptyDescription: "
|
|
24
|
-
errorTitle: "
|
|
25
|
-
errorDescription: "
|
|
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: {
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -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.
|
|
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,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 };
|