@tesouro/embedded-components-react 0.5.18 → 0.5.20
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 +22 -21
- package/dist/index.css +18 -0
- package/dist/index.d.ts +29 -6
- package/dist/index.js +1 -1
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/lib/CardDetailsWidget.d.ts +20 -2
- package/dist/lib/CreditCardsWidget.d.ts +29 -6
- package/dist/lib/DebitCardsWidget.d.ts +29 -6
- package/dist/lib/WidgetSuite.d.ts +29 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +4 -91
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +78 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +98 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +3 -49
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +47 -136
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +136 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +33 -187
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +188 -75
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +75 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +22 -232
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +223 -210
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +202 -108
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +126 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +12 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +47 -53
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +49 -202
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +202 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +32 -234
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +240 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +19 -434
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +436 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +4 -38
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +35 -231
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +235 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +2 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +46 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +6 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +10 -110
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +112 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +3 -127
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +124 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +8 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +8 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +43 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +20 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +27 -82
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +83 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +47 -250
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +239 -104
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +110 -206
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +213 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +4 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +6 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +115 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index87.js +0 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index13.js +152 -149
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index3.js +8 -11
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index4.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index6.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index7.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index9.js +81 -79
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/ActivateCardPanel.js +39 -38
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/AddressLine.js +23 -0
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardDetailsPanel.js +142 -118
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardFace.js +24 -14
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/labels.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/ui/dist/lib/CreateCardWidget/CardControls/PerTransactionMaximumControl.js +17 -16
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/ui/dist/lib/CreateCardWidget/CardControls/SpendLimitControl.js +25 -24
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/ui/dist/lib/CreateCardWidget/CardControls/limitDecimalPlaces.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/ui/dist/lib/CreateCardWidget/SetupView.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index10.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index11.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index12.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index13.js +24 -0
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index14.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index15.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index16.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index17.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index18.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index19.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index2.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index20.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index21.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index22.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index23.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index3.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index4.js +29 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index5.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index6.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index7.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index8.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index9.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index10.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index11.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index12.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index13.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index14.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index15.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index16.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index17.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index2.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index3.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index6.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index7.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index8.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index9.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index10.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index11.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index12.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index13.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index14.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index15.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index16.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index17.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index18.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index5.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index6.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index7.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index8.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index9.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +12 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/card/cardPresentation.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index11.js +0 -3
- package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index13.js +0 -24
- package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index2.js +0 -10
- package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index4.js +0 -29
- package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index5.js +0 -10
- package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index6.js +0 -10
- package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index2.js +0 -9
- /package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index.js +0 -0
- /package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index.js +0 -0
|
@@ -3,197 +3,221 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
5
|
import { Button as e, Skeleton as t, cn as n } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
-
import { EmptyState as
|
|
7
|
-
import { ErrorState as
|
|
6
|
+
import { EmptyState as ee } from "../../../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
|
|
7
|
+
import { ErrorState as r } from "../../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
8
8
|
import { InlineErrorAlert as i } from "../../../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
|
|
9
9
|
import "../../../../../shared/ui/dist/index.js";
|
|
10
|
-
import { CardDetailsHeader as
|
|
11
|
-
import { CARD_FACE_WIDTH_CLASS_NAME as
|
|
12
|
-
import { CardFace as
|
|
10
|
+
import { CardDetailsHeader as te } from "./CardDetailsHeader.js";
|
|
11
|
+
import { CARD_FACE_WIDTH_CLASS_NAME as ne } from "./cardFaceSurface.js";
|
|
12
|
+
import { CardFace as a } from "./CardFace.js";
|
|
13
13
|
import { DetailCopyRow as o } from "./DetailCopyRow.js";
|
|
14
14
|
import { resolveCardDetailsPanelLabels as s } from "./labels.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
15
|
+
import { AddressLine as c } from "./AddressLine.js";
|
|
16
|
+
import { CardCredentialsFace as re } from "./CardCredentialsFace.js";
|
|
17
|
+
import { CardFaceFlip as ie } from "./CardFaceFlip.js";
|
|
18
|
+
import { NicknameRow as ae } from "./NicknameRow.js";
|
|
19
|
+
import { useMemo as oe } from "react";
|
|
20
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
21
|
+
import { CheckIcon as d, CreditCardIcon as f, EyeIcon as p, EyeOffIcon as m, LockIcon as h, LockOpenIcon as se, PowerIcon as ce } from "lucide-react";
|
|
21
22
|
//#region ../../libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardDetailsPanel.js
|
|
22
|
-
function g({ labels: g, state: _, nickname: v, statusLabel:
|
|
23
|
-
let
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
function g({ labels: g, state: _, nickname: v, statusLabel: le, statusTone: ue, formFactorLabel: de, cardMenu: fe, onClose: pe, cardArtSrc: me, bankLogoSrc: he, bankLogoAlt: ge, cardholderName: y, maskedCardNumber: _e, programLabel: ve, cardFaceStatusLabel: ye, billingAddress: b, allowedCategories: x, spendLimitLabels: S, perTransactionMaxLabel: C, onCopy: w, onEditNickname: T, nicknameEditState: E = "closed", nicknameDraft: D, onNicknameDraftChange: O, onSaveNickname: k, onCancelNicknameEdit: A, isNicknameSaveDisabled: j, onActivate: M, onViewCard: N, onHideCard: P, revealState: F = "hidden", revealedCardNumber: be, revealedExpirationDate: xe, revealedSecurityCode: Se, isLocked: I, lockState: L = "idle", onLockCard: R, onUnlockCard: z, onRetry: Ce, testIds: B, className: we }) {
|
|
24
|
+
let V = oe(() => s(g), [g]), H = b?.addressLine1, U = b?.addressLine2, W = b?.cityState, G = b?.postalCode, Te = !!(H || U || W || G), K = !!x?.length, q = !!S?.length, J = !!C, Y = F === "revealed", X = Y ? P : N, Z = !!(R || z), Q = I ? z : R, $ = /* @__PURE__ */ l(a, {
|
|
25
|
+
cardArtSrc: me,
|
|
26
|
+
bankLogoSrc: he,
|
|
27
|
+
bankLogoAlt: ge ?? V.cardFace.bankLogoAlt,
|
|
26
28
|
cardholderName: y ?? "",
|
|
27
|
-
maskedCardNumber:
|
|
28
|
-
programLabel:
|
|
29
|
-
statusLabel:
|
|
30
|
-
isLocked:
|
|
31
|
-
lockedLabel:
|
|
32
|
-
testIds:
|
|
29
|
+
maskedCardNumber: _e ?? "",
|
|
30
|
+
programLabel: ve ?? "",
|
|
31
|
+
statusLabel: ye,
|
|
32
|
+
isLocked: I,
|
|
33
|
+
lockedLabel: V.lock.cardFaceLabel,
|
|
34
|
+
testIds: B?.cardFace
|
|
33
35
|
});
|
|
34
|
-
return /* @__PURE__ */
|
|
35
|
-
"data-testid":
|
|
36
|
-
className: n("ttw:flex ttw:w-full ttw:flex-col",
|
|
37
|
-
children: [/* @__PURE__ */
|
|
38
|
-
testIds:
|
|
39
|
-
labels:
|
|
40
|
-
title: _ === "loaded" ? v ??
|
|
36
|
+
return /* @__PURE__ */ u("div", {
|
|
37
|
+
"data-testid": B?.root,
|
|
38
|
+
className: n("ttw:flex ttw:w-full ttw:flex-col", we),
|
|
39
|
+
children: [/* @__PURE__ */ l(te, {
|
|
40
|
+
testIds: B?.header,
|
|
41
|
+
labels: V.header,
|
|
42
|
+
title: _ === "loaded" ? v ?? V.header.untitledCard : void 0,
|
|
41
43
|
isTitlePending: _ === "loading",
|
|
42
|
-
statusLabel: _ === "loaded" ?
|
|
43
|
-
statusTone:
|
|
44
|
-
formFactorLabel: _ === "loaded" ?
|
|
45
|
-
cardMenu: _ === "loaded" ?
|
|
46
|
-
onClose:
|
|
47
|
-
}), /* @__PURE__ */
|
|
44
|
+
statusLabel: _ === "loaded" ? le : void 0,
|
|
45
|
+
statusTone: ue,
|
|
46
|
+
formFactorLabel: _ === "loaded" ? de : void 0,
|
|
47
|
+
cardMenu: _ === "loaded" ? fe : void 0,
|
|
48
|
+
onClose: pe
|
|
49
|
+
}), /* @__PURE__ */ l("div", {
|
|
48
50
|
className: "ttw:px-4 ttw:pb-4",
|
|
49
|
-
children: _ === "loading" ? /* @__PURE__ */
|
|
50
|
-
"data-testid":
|
|
51
|
+
children: _ === "loading" ? /* @__PURE__ */ u("div", {
|
|
52
|
+
"data-testid": B?.loading,
|
|
51
53
|
role: "status",
|
|
52
|
-
"aria-label":
|
|
54
|
+
"aria-label": V.status.loadingAriaLabel,
|
|
53
55
|
className: "ttw:space-y-4",
|
|
54
|
-
children: [/* @__PURE__ */
|
|
55
|
-
}) : _ === "error" ? /* @__PURE__ */
|
|
56
|
-
title:
|
|
57
|
-
description:
|
|
58
|
-
retryLabel:
|
|
59
|
-
onRetry:
|
|
60
|
-
}) : _ === "notFound" ? /* @__PURE__ */
|
|
61
|
-
icon: /* @__PURE__ */ f
|
|
62
|
-
title:
|
|
63
|
-
description:
|
|
64
|
-
}) : /* @__PURE__ */
|
|
56
|
+
children: [/* @__PURE__ */ l(t, { className: "ttw:h-8 ttw:w-56" }), /* @__PURE__ */ l(t, { className: "ttw:h-64 ttw:w-full ttw:rounded-xl" })]
|
|
57
|
+
}) : _ === "error" ? /* @__PURE__ */ l(r, {
|
|
58
|
+
title: V.status.errorTitle,
|
|
59
|
+
description: V.status.errorDescription,
|
|
60
|
+
retryLabel: V.status.errorRetry,
|
|
61
|
+
onRetry: Ce
|
|
62
|
+
}) : _ === "notFound" ? /* @__PURE__ */ l(ee, {
|
|
63
|
+
icon: /* @__PURE__ */ l(f, { className: "ttw:size-6 ttw:text-muted-foreground" }),
|
|
64
|
+
title: V.status.notFoundTitle,
|
|
65
|
+
description: V.status.notFoundDescription
|
|
66
|
+
}) : /* @__PURE__ */ u("div", {
|
|
65
67
|
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
66
|
-
children: [/* @__PURE__ */
|
|
68
|
+
children: [/* @__PURE__ */ u("div", {
|
|
67
69
|
className: "ttw:flex ttw:flex-col ttw:overflow-hidden ttw:rounded-xl ttw:border ttw:border-border ttw:sm:flex-row",
|
|
68
|
-
children: [/* @__PURE__ */
|
|
70
|
+
children: [/* @__PURE__ */ l("div", {
|
|
69
71
|
className: "ttw:flex ttw:items-center ttw:justify-center ttw:bg-muted ttw:px-4 ttw:py-5",
|
|
70
|
-
children: /* @__PURE__ */
|
|
71
|
-
className: n("ttw:flex ttw:flex-col ttw:gap-4",
|
|
72
|
-
children: [
|
|
73
|
-
testIds:
|
|
72
|
+
children: /* @__PURE__ */ u("div", {
|
|
73
|
+
className: n("ttw:flex ttw:flex-col ttw:gap-4", ne),
|
|
74
|
+
children: [N ? /* @__PURE__ */ l(ie, {
|
|
75
|
+
testIds: B?.cardFaceFlip,
|
|
74
76
|
isFlipped: Y,
|
|
75
77
|
front: $,
|
|
76
|
-
back: /* @__PURE__ */
|
|
77
|
-
labels:
|
|
78
|
-
cardNumber:
|
|
79
|
-
expirationDate:
|
|
80
|
-
securityCode:
|
|
81
|
-
isLocked:
|
|
82
|
-
onCopy:
|
|
83
|
-
testIds:
|
|
78
|
+
back: /* @__PURE__ */ l(re, {
|
|
79
|
+
labels: V.credentials,
|
|
80
|
+
cardNumber: be,
|
|
81
|
+
expirationDate: xe,
|
|
82
|
+
securityCode: Se,
|
|
83
|
+
isLocked: I,
|
|
84
|
+
onCopy: w,
|
|
85
|
+
testIds: B?.credentialsFace
|
|
84
86
|
})
|
|
85
|
-
}) : $,
|
|
87
|
+
}) : $, M || N || Z ? /* @__PURE__ */ u("div", {
|
|
86
88
|
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
87
89
|
children: [
|
|
88
|
-
|
|
90
|
+
M ? /* @__PURE__ */ u(e, {
|
|
89
91
|
type: "button",
|
|
90
92
|
className: "ttw:self-center",
|
|
91
|
-
onClick:
|
|
92
|
-
children: [/* @__PURE__ */
|
|
93
|
+
onClick: M,
|
|
94
|
+
children: [/* @__PURE__ */ l(ce, {
|
|
93
95
|
className: "ttw:size-4",
|
|
94
96
|
"aria-hidden": "true"
|
|
95
|
-
}),
|
|
97
|
+
}), V.actions.activateCard]
|
|
96
98
|
}) : null,
|
|
97
|
-
|
|
99
|
+
N || Z ? /* @__PURE__ */ u("div", {
|
|
98
100
|
className: "ttw:flex ttw:gap-2",
|
|
99
|
-
children: [
|
|
101
|
+
children: [N ? /* @__PURE__ */ u(e, {
|
|
100
102
|
type: "button",
|
|
101
103
|
variant: "outline",
|
|
102
104
|
className: "ttw:flex-1",
|
|
103
105
|
disabled: !X,
|
|
104
|
-
loading:
|
|
106
|
+
loading: F === "revealing",
|
|
105
107
|
onClick: X,
|
|
106
|
-
children: [
|
|
108
|
+
children: [l(Y ? m : p, {
|
|
107
109
|
className: "ttw:size-4",
|
|
108
110
|
"aria-hidden": "true"
|
|
109
|
-
}), Y ?
|
|
110
|
-
}) : null, Z ? /* @__PURE__ */
|
|
111
|
+
}), Y ? V.actions.hideCard : V.actions.viewCard]
|
|
112
|
+
}) : null, Z ? /* @__PURE__ */ u(e, {
|
|
111
113
|
type: "button",
|
|
112
114
|
variant: "outline",
|
|
113
115
|
className: "ttw:flex-1",
|
|
114
116
|
disabled: !Q,
|
|
115
|
-
loading:
|
|
117
|
+
loading: L === "pending",
|
|
116
118
|
onClick: Q,
|
|
117
|
-
children: [
|
|
119
|
+
children: [l(I ? se : h, {
|
|
118
120
|
className: "ttw:size-4",
|
|
119
121
|
"aria-hidden": "true"
|
|
120
|
-
}),
|
|
122
|
+
}), I ? V.lock.unlockCard : V.lock.lockCard]
|
|
121
123
|
}) : null]
|
|
122
124
|
}) : null,
|
|
123
|
-
|
|
125
|
+
I ? /* @__PURE__ */ l("p", {
|
|
124
126
|
className: "ttw:text-sm ttw:text-destructive",
|
|
125
|
-
children: Z ?
|
|
127
|
+
children: Z ? V.lock.lockedDescription : V.lock.lockedDescriptionWithoutUnlock
|
|
126
128
|
}) : null,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
+
L === "errored" ? /* @__PURE__ */ l(i, { children: V.lock.errorDescription }) : null,
|
|
130
|
+
F === "errored" ? /* @__PURE__ */ l(i, { children: V.credentials.errorDescription }) : null
|
|
129
131
|
]
|
|
130
132
|
}) : null]
|
|
131
133
|
})
|
|
132
|
-
}), /* @__PURE__ */
|
|
134
|
+
}), /* @__PURE__ */ u("div", {
|
|
133
135
|
className: "ttw:flex ttw:min-w-0 ttw:flex-1 ttw:flex-col ttw:border-t ttw:border-border ttw:sm:border-t-0 ttw:sm:border-l",
|
|
134
136
|
children: [
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
-
label:
|
|
137
|
-
copyAriaLabel: y &&
|
|
138
|
-
onCopy: y &&
|
|
139
|
-
children: y ??
|
|
137
|
+
/* @__PURE__ */ l(o, {
|
|
138
|
+
label: V.fields.cardholder,
|
|
139
|
+
copyAriaLabel: y && w ? V.fields.copyCardholderAriaLabel : void 0,
|
|
140
|
+
onCopy: y && w ? () => w(y) : void 0,
|
|
141
|
+
children: y ?? V.fields.emptyValue
|
|
140
142
|
}),
|
|
141
|
-
|
|
142
|
-
label:
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
143
|
+
Te ? /* @__PURE__ */ l(o, {
|
|
144
|
+
label: V.fields.billingAddress,
|
|
145
|
+
children: /* @__PURE__ */ u("div", {
|
|
146
|
+
className: "ttw:flex ttw:flex-col",
|
|
147
|
+
children: [
|
|
148
|
+
H ? /* @__PURE__ */ l(c, {
|
|
149
|
+
value: H,
|
|
150
|
+
copyAriaLabel: w ? V.fields.copyBillingAddressLine1AriaLabel : void 0,
|
|
151
|
+
onCopy: w ? () => w(H) : void 0
|
|
152
|
+
}) : null,
|
|
153
|
+
U ? /* @__PURE__ */ l(c, {
|
|
154
|
+
value: U,
|
|
155
|
+
copyAriaLabel: w ? V.fields.copyBillingAddressLine2AriaLabel : void 0,
|
|
156
|
+
onCopy: w ? () => w(U) : void 0
|
|
157
|
+
}) : null,
|
|
158
|
+
W ? /* @__PURE__ */ l(c, {
|
|
159
|
+
value: W,
|
|
160
|
+
copyAriaLabel: w ? V.fields.copyBillingAddressCityStateAriaLabel : void 0,
|
|
161
|
+
onCopy: w ? () => w(W) : void 0
|
|
162
|
+
}) : null,
|
|
163
|
+
G ? /* @__PURE__ */ l(c, {
|
|
164
|
+
value: G,
|
|
165
|
+
copyAriaLabel: w ? V.fields.copyBillingAddressPostalCodeAriaLabel : void 0,
|
|
166
|
+
onCopy: w ? () => w(G) : void 0
|
|
167
|
+
}) : null
|
|
168
|
+
]
|
|
169
|
+
})
|
|
146
170
|
}) : null,
|
|
147
|
-
/* @__PURE__ */
|
|
148
|
-
fieldLabels:
|
|
149
|
-
labels:
|
|
171
|
+
/* @__PURE__ */ l(ae, {
|
|
172
|
+
fieldLabels: V.fields,
|
|
173
|
+
labels: V.nickname,
|
|
150
174
|
nickname: v,
|
|
151
|
-
editState:
|
|
152
|
-
onEdit:
|
|
153
|
-
draft:
|
|
154
|
-
onDraftChange:
|
|
155
|
-
onSave:
|
|
156
|
-
onCancel:
|
|
157
|
-
isSaveDisabled:
|
|
158
|
-
copyAriaLabel: v &&
|
|
159
|
-
onCopy: v &&
|
|
175
|
+
editState: E,
|
|
176
|
+
onEdit: T,
|
|
177
|
+
draft: D,
|
|
178
|
+
onDraftChange: O,
|
|
179
|
+
onSave: k,
|
|
180
|
+
onCancel: A,
|
|
181
|
+
isSaveDisabled: j,
|
|
182
|
+
copyAriaLabel: v && w ? V.fields.copyNicknameAriaLabel : void 0,
|
|
183
|
+
onCopy: v && w ? () => w(v) : void 0,
|
|
160
184
|
isLast: !0
|
|
161
185
|
})
|
|
162
186
|
]
|
|
163
187
|
})]
|
|
164
|
-
}), K || q || J ? /* @__PURE__ */
|
|
188
|
+
}), K || q || J ? /* @__PURE__ */ u("div", {
|
|
165
189
|
className: "ttw:flex ttw:flex-col ttw:overflow-hidden ttw:rounded-xl ttw:border ttw:border-border",
|
|
166
190
|
children: [
|
|
167
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ l("h3", {
|
|
168
192
|
className: "ttw:border-b ttw:border-border ttw:px-4 ttw:pt-4 ttw:pb-3 ttw:text-base ttw:font-semibold ttw:text-foreground",
|
|
169
|
-
children:
|
|
193
|
+
children: V.fields.cardControlsHeading
|
|
170
194
|
}),
|
|
171
|
-
K ? /* @__PURE__ */
|
|
172
|
-
label:
|
|
195
|
+
K ? /* @__PURE__ */ l(o, {
|
|
196
|
+
label: V.fields.allowedCategories,
|
|
173
197
|
isLast: !q && !J,
|
|
174
|
-
children: /* @__PURE__ */
|
|
198
|
+
children: /* @__PURE__ */ l("div", {
|
|
175
199
|
className: "ttw:mt-2 ttw:flex ttw:flex-wrap ttw:gap-2",
|
|
176
|
-
children:
|
|
200
|
+
children: x?.map((e) => /* @__PURE__ */ u("span", {
|
|
177
201
|
className: "ttw:inline-flex ttw:items-center ttw:gap-1.5 ttw:rounded-full ttw:border ttw:border-primary ttw:bg-primary/5 ttw:px-4 ttw:py-2 ttw:text-sm ttw:font-semibold ttw:text-primary",
|
|
178
|
-
children: [/* @__PURE__ */
|
|
202
|
+
children: [/* @__PURE__ */ l(d, {
|
|
179
203
|
"aria-hidden": "true",
|
|
180
204
|
className: "ttw:size-3.5"
|
|
181
205
|
}), e]
|
|
182
206
|
}, e))
|
|
183
207
|
})
|
|
184
208
|
}) : null,
|
|
185
|
-
q ? /* @__PURE__ */
|
|
186
|
-
label:
|
|
209
|
+
q ? /* @__PURE__ */ l(o, {
|
|
210
|
+
label: V.fields.spendLimit,
|
|
187
211
|
isLast: !J,
|
|
188
|
-
children: /* @__PURE__ */
|
|
212
|
+
children: /* @__PURE__ */ l("div", {
|
|
189
213
|
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
190
|
-
children:
|
|
214
|
+
children: S?.map((e, t) => /* @__PURE__ */ l("div", { children: e }, `${e}-${t}`))
|
|
191
215
|
})
|
|
192
216
|
}) : null,
|
|
193
|
-
J ? /* @__PURE__ */
|
|
194
|
-
label:
|
|
217
|
+
J ? /* @__PURE__ */ l(o, {
|
|
218
|
+
label: V.fields.perTransactionMax,
|
|
195
219
|
isLast: !0,
|
|
196
|
-
children:
|
|
220
|
+
children: C
|
|
197
221
|
}) : null
|
|
198
222
|
]
|
|
199
223
|
}) : null]
|
|
@@ -4,32 +4,42 @@ import { CardFaceGlow as r } from "./CardFaceGlow.js";
|
|
|
4
4
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
5
|
import { LockIcon as o } from "lucide-react";
|
|
6
6
|
//#region ../../libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardFace.js
|
|
7
|
-
function s({
|
|
7
|
+
function s({ cardArtSrc: s, bankLogoSrc: c, bankLogoAlt: l, cardholderName: u, maskedCardNumber: d, programLabel: f, statusLabel: p, isLocked: m, lockedLabel: h, testIds: g, className: _ }) {
|
|
8
8
|
return /* @__PURE__ */ a("div", {
|
|
9
|
-
"data-testid":
|
|
10
|
-
className: e(n, "ttw:justify-between",
|
|
9
|
+
"data-testid": g?.root,
|
|
10
|
+
className: e(n, "ttw:justify-between", _),
|
|
11
11
|
children: [
|
|
12
|
-
/* @__PURE__ */ i(r, {}),
|
|
13
12
|
s ? /* @__PURE__ */ i("img", {
|
|
13
|
+
"data-testid": g?.cardArt,
|
|
14
14
|
src: s,
|
|
15
|
-
alt:
|
|
15
|
+
alt: "",
|
|
16
|
+
"aria-hidden": "true",
|
|
17
|
+
className: "ttw:absolute ttw:inset-0 ttw:h-full ttw:w-full ttw:object-cover"
|
|
18
|
+
}) : /* @__PURE__ */ i(r, {}),
|
|
19
|
+
s ? /* @__PURE__ */ i("div", {
|
|
20
|
+
"aria-hidden": "true",
|
|
21
|
+
className: "ttw:pointer-events-none ttw:absolute ttw:inset-x-0 ttw:bottom-0 ttw:h-20 ttw:bg-gradient-to-t ttw:from-black/70 ttw:to-transparent"
|
|
22
|
+
}) : null,
|
|
23
|
+
s ? /* @__PURE__ */ i("span", { className: "ttw:relative ttw:h-8" }) : c ? /* @__PURE__ */ i("img", {
|
|
24
|
+
src: c,
|
|
25
|
+
alt: l,
|
|
16
26
|
className: "ttw:relative ttw:h-8 ttw:w-auto ttw:max-w-[60%] ttw:object-contain ttw:object-left"
|
|
17
27
|
}) : /* @__PURE__ */ i("span", { className: "ttw:relative ttw:h-8" }),
|
|
18
|
-
|
|
19
|
-
"data-testid":
|
|
28
|
+
m ? /* @__PURE__ */ i("div", {
|
|
29
|
+
"data-testid": g?.lockedOverlay,
|
|
20
30
|
className: "ttw:pointer-events-none ttw:absolute ttw:inset-0 ttw:flex ttw:items-center ttw:justify-center ttw:bg-black/55",
|
|
21
|
-
children:
|
|
31
|
+
children: h ? /* @__PURE__ */ a("span", {
|
|
22
32
|
className: e(t, "ttw:inline-flex ttw:items-center ttw:gap-1.5"),
|
|
23
33
|
children: [/* @__PURE__ */ i(o, {
|
|
24
34
|
className: "ttw:size-3.5",
|
|
25
35
|
"aria-hidden": "true"
|
|
26
|
-
}),
|
|
36
|
+
}), h]
|
|
27
37
|
}) : null
|
|
28
|
-
}) :
|
|
38
|
+
}) : p ? /* @__PURE__ */ i("div", {
|
|
29
39
|
className: "ttw:pointer-events-none ttw:absolute ttw:inset-0 ttw:flex ttw:items-center ttw:justify-center",
|
|
30
40
|
children: /* @__PURE__ */ i("span", {
|
|
31
41
|
className: t,
|
|
32
|
-
children:
|
|
42
|
+
children: p
|
|
33
43
|
})
|
|
34
44
|
}) : null,
|
|
35
45
|
/* @__PURE__ */ a("div", {
|
|
@@ -38,14 +48,14 @@ function s({ bankLogoSrc: s, bankLogoAlt: c, cardholderName: l, maskedCardNumber
|
|
|
38
48
|
className: "ttw:min-w-0",
|
|
39
49
|
children: [/* @__PURE__ */ i("p", {
|
|
40
50
|
className: "ttw:truncate ttw:text-base ttw:font-medium ttw:text-white",
|
|
41
|
-
children:
|
|
51
|
+
children: u
|
|
42
52
|
}), /* @__PURE__ */ i("p", {
|
|
43
53
|
className: "ttw:mt-1 ttw:truncate ttw:text-lg ttw:tracking-wide ttw:text-white/90",
|
|
44
|
-
children:
|
|
54
|
+
children: d
|
|
45
55
|
})]
|
|
46
56
|
}), /* @__PURE__ */ i("p", {
|
|
47
57
|
className: "ttw:shrink-0 ttw:text-[10px] ttw:font-medium ttw:text-white/90",
|
|
48
|
-
children:
|
|
58
|
+
children: f
|
|
49
59
|
})]
|
|
50
60
|
})
|
|
51
61
|
]
|
|
@@ -17,7 +17,10 @@ var e = {
|
|
|
17
17
|
emptyValue: "—",
|
|
18
18
|
copyCardholderAriaLabel: "Copy cardholder",
|
|
19
19
|
copyNicknameAriaLabel: "Copy nickname",
|
|
20
|
-
|
|
20
|
+
copyBillingAddressLine1AriaLabel: "Copy street address 1",
|
|
21
|
+
copyBillingAddressLine2AriaLabel: "Copy street address 2",
|
|
22
|
+
copyBillingAddressCityStateAriaLabel: "Copy city and state",
|
|
23
|
+
copyBillingAddressPostalCodeAriaLabel: "Copy ZIP code"
|
|
21
24
|
},
|
|
22
25
|
actions: {
|
|
23
26
|
activateCard: "Activate card",
|
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
import { InputGroup as e, InputGroupAddon as t, InputGroupInput as n } from "../../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
2
|
import { formatAmountAriaLabel as r } from "./labels.js";
|
|
3
3
|
import { CardControlRow as i } from "./CardControlRow.js";
|
|
4
|
-
import {
|
|
4
|
+
import { limitDecimalPlaces as a } from "./limitDecimalPlaces.js";
|
|
5
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
5
6
|
//#region ../../libs/tesouro-embedded-components-react/create-card-widget/ui/dist/lib/CreateCardWidget/CardControls/PerTransactionMaximumControl.js
|
|
6
|
-
function
|
|
7
|
-
return /* @__PURE__ */
|
|
8
|
-
title:
|
|
9
|
-
description:
|
|
10
|
-
checked:
|
|
11
|
-
onCheckedChange:
|
|
12
|
-
children: /* @__PURE__ */
|
|
7
|
+
function c({ labels: c, currencySymbol: l, isEnabled: u, onEnabledChange: d, amount: f, onAmountChange: p }) {
|
|
8
|
+
return /* @__PURE__ */ o(i, {
|
|
9
|
+
title: c.title,
|
|
10
|
+
description: c.description,
|
|
11
|
+
checked: u,
|
|
12
|
+
onCheckedChange: d,
|
|
13
|
+
children: /* @__PURE__ */ s(e, {
|
|
13
14
|
className: "ttw:h-9 ttw:max-w-48 ttw:rounded-md ttw:border ttw:border-input ttw:shadow-xs ttw:has-[:focus-visible]:border-ring ttw:has-[:focus-visible]:ring-[3px] ttw:has-[:focus-visible]:ring-ring/50",
|
|
14
|
-
children: [/* @__PURE__ */
|
|
15
|
+
children: [/* @__PURE__ */ o(t, {
|
|
15
16
|
align: "inline-start",
|
|
16
17
|
"aria-hidden": !0,
|
|
17
|
-
children:
|
|
18
|
-
}), /* @__PURE__ */
|
|
18
|
+
children: l
|
|
19
|
+
}), /* @__PURE__ */ o(n, {
|
|
19
20
|
"data-has-start-addon": !0,
|
|
20
21
|
inputMode: "decimal",
|
|
21
|
-
value:
|
|
22
|
-
onChange: (e) =>
|
|
23
|
-
placeholder:
|
|
24
|
-
"aria-label": r(
|
|
22
|
+
value: f,
|
|
23
|
+
onChange: (e) => p(a(e.target.value)),
|
|
24
|
+
placeholder: c.amountPlaceholder,
|
|
25
|
+
"aria-label": r(c.amountAriaLabel, l),
|
|
25
26
|
className: "ttw:rounded-md ttw:border-0 ttw:shadow-none ttw:focus-visible:ring-0"
|
|
26
27
|
})]
|
|
27
28
|
})
|
|
28
29
|
});
|
|
29
30
|
}
|
|
30
31
|
//#endregion
|
|
31
|
-
export {
|
|
32
|
+
export { c as PerTransactionMaximumControl };
|
|
@@ -1,63 +1,64 @@
|
|
|
1
1
|
import { Alert as e, AlertDescription as t, InputGroup as n, InputGroupAddon as r, InputGroupInput as i, Tabs as a, TabsContent as o, TabsList as s, TabsTrigger as c } from "../../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
2
|
import { formatAmountAriaLabel as l } from "./labels.js";
|
|
3
3
|
import { CardControlRow as u } from "./CardControlRow.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { limitDecimalPlaces as d } from "./limitDecimalPlaces.js";
|
|
5
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
6
|
+
import { InfoIcon as m, TriangleAlertIcon as h } from "lucide-react";
|
|
6
7
|
//#region ../../libs/tesouro-embedded-components-react/create-card-widget/ui/dist/lib/CreateCardWidget/CardControls/SpendLimitControl.js
|
|
7
|
-
function
|
|
8
|
+
function g({ notice: n }) {
|
|
8
9
|
if (!n) return null;
|
|
9
10
|
let r = n.variant === "warning";
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ p(e, {
|
|
11
12
|
className: r ? "ttw:border-destructive/30 ttw:bg-destructive/5 ttw:text-destructive" : "ttw:border-border ttw:bg-muted ttw:text-foreground",
|
|
12
|
-
children: [/* @__PURE__ */
|
|
13
|
+
children: [/* @__PURE__ */ f(r ? h : m, { "aria-hidden": !0 }), /* @__PURE__ */ f(t, {
|
|
13
14
|
className: "ttw:text-current",
|
|
14
|
-
children: /* @__PURE__ */
|
|
15
|
+
children: /* @__PURE__ */ p("p", { children: [n.title ? /* @__PURE__ */ p("span", {
|
|
15
16
|
className: "ttw:font-semibold",
|
|
16
17
|
children: [n.title, " "]
|
|
17
18
|
}) : null, n.description] })
|
|
18
19
|
})]
|
|
19
20
|
});
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
-
return /* @__PURE__ */
|
|
22
|
+
function _({ labels: e, currencySymbol: t, isEnabled: m, onEnabledChange: h, amount: _, onAmountChange: v, periodOptions: y, selectedPeriod: b, onPeriodSelect: x, periodNotices: S }) {
|
|
23
|
+
return /* @__PURE__ */ f(u, {
|
|
23
24
|
title: e.title,
|
|
24
25
|
description: e.description,
|
|
25
|
-
checked:
|
|
26
|
-
onCheckedChange:
|
|
27
|
-
children: /* @__PURE__ */
|
|
28
|
-
value:
|
|
29
|
-
onValueChange:
|
|
30
|
-
children: [/* @__PURE__ */
|
|
26
|
+
checked: m,
|
|
27
|
+
onCheckedChange: h,
|
|
28
|
+
children: /* @__PURE__ */ p(a, {
|
|
29
|
+
value: b ?? "",
|
|
30
|
+
onValueChange: x,
|
|
31
|
+
children: [/* @__PURE__ */ p("div", {
|
|
31
32
|
className: "ttw:flex ttw:min-w-0 ttw:flex-wrap ttw:items-center ttw:gap-3",
|
|
32
|
-
children: [/* @__PURE__ */
|
|
33
|
+
children: [/* @__PURE__ */ p(n, {
|
|
33
34
|
className: "ttw:h-9 ttw:min-w-0 ttw:flex-1 ttw:basis-36 ttw:rounded-md ttw:border ttw:border-input ttw:shadow-xs ttw:has-[:focus-visible]:border-ring ttw:has-[:focus-visible]:ring-[3px] ttw:has-[:focus-visible]:ring-ring/50",
|
|
34
|
-
children: [/* @__PURE__ */
|
|
35
|
+
children: [/* @__PURE__ */ f(r, {
|
|
35
36
|
align: "inline-start",
|
|
36
37
|
"aria-hidden": !0,
|
|
37
38
|
children: t
|
|
38
|
-
}), /* @__PURE__ */
|
|
39
|
+
}), /* @__PURE__ */ f(i, {
|
|
39
40
|
"data-has-start-addon": !0,
|
|
40
41
|
inputMode: "decimal",
|
|
41
|
-
value:
|
|
42
|
-
onChange: (e) =>
|
|
42
|
+
value: _,
|
|
43
|
+
onChange: (e) => v(d(e.target.value)),
|
|
43
44
|
placeholder: e.amountPlaceholder,
|
|
44
45
|
"aria-label": l(e.amountAriaLabel, t),
|
|
45
46
|
className: "ttw:rounded-md ttw:border-0 ttw:shadow-none ttw:focus-visible:ring-0"
|
|
46
47
|
})]
|
|
47
|
-
}),
|
|
48
|
+
}), y.length > 0 ? /* @__PURE__ */ f(s, {
|
|
48
49
|
className: "ttw:max-w-full",
|
|
49
|
-
children:
|
|
50
|
+
children: y.map((e) => /* @__PURE__ */ f(c, {
|
|
50
51
|
value: e.value,
|
|
51
52
|
children: e.label
|
|
52
53
|
}, e.value))
|
|
53
54
|
}) : null]
|
|
54
|
-
}),
|
|
55
|
+
}), y.map((e) => /* @__PURE__ */ f(o, {
|
|
55
56
|
value: e.value,
|
|
56
57
|
className: "ttw:mt-4",
|
|
57
|
-
children: /* @__PURE__ */
|
|
58
|
+
children: /* @__PURE__ */ f(g, { notice: S?.find((t) => t.value === e.value) })
|
|
58
59
|
}, e.value))]
|
|
59
60
|
})
|
|
60
61
|
});
|
|
61
62
|
}
|
|
62
63
|
//#endregion
|
|
63
|
-
export {
|
|
64
|
+
export { _ as SpendLimitControl };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/create-card-widget/ui/dist/lib/CreateCardWidget/CardControls/limitDecimalPlaces.js
|
|
2
|
+
function e(e, t = 2) {
|
|
3
|
+
let n = e.indexOf(".");
|
|
4
|
+
return n === -1 ? e : e.slice(0, n + 1 + t);
|
|
5
|
+
}
|
|
6
|
+
//#endregion
|
|
7
|
+
export { e as limitDecimalPlaces };
|
|
@@ -131,7 +131,7 @@ function v({ cardArtSrc: v, labels: y, cardholderOptions: b, selectedCardholder:
|
|
|
131
131
|
})]
|
|
132
132
|
})]
|
|
133
133
|
}), R ? /* @__PURE__ */ g("div", {
|
|
134
|
-
className: "ttw:rounded-md ttw:border ttw:border-border ttw:bg-background ttw:px-3 ttw:py-2 ttw:text-sm ttw:text-foreground",
|
|
134
|
+
className: "ttw:cursor-default ttw:rounded-md ttw:border ttw:border-border ttw:bg-background ttw:px-3 ttw:py-2 ttw:text-sm ttw:text-foreground",
|
|
135
135
|
children: L
|
|
136
136
|
}) : null]
|
|
137
137
|
}), /* @__PURE__ */ _("div", {
|
|
@@ -21,8 +21,8 @@ import { TagsWidget as p } from "../../../tags-widget/feature/dist/index11.js";
|
|
|
21
21
|
import "../../../tags-widget/feature/dist/index.js";
|
|
22
22
|
import { BankDisclosuresWidget as m } from "../../../shared/bank-disclosures/feature/dist/lib/BankDisclosuresWidget/BankDisclosuresWidget.js";
|
|
23
23
|
import "../../../shared/bank-disclosures/feature/dist/index.js";
|
|
24
|
-
import { TeamWidget as h } from "
|
|
25
|
-
import "
|
|
24
|
+
import { TeamWidget as h } from "../../team/feature/dist/index17.js";
|
|
25
|
+
import "../../team/feature/dist/index.js";
|
|
26
26
|
import { SettingsWidgetUi as g } from "../../ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js";
|
|
27
27
|
import "../../ui/dist/index.js";
|
|
28
28
|
import { ChartOfAccountsWidget as _ } from "../../chart-of-accounts/feature/dist/index8.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useAllOrganizationRolesQuery as e } from "
|
|
1
|
+
import { useAllOrganizationRolesQuery as e } from "../../../../shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js";
|
|
2
2
|
import "./index2.js";
|
|
3
3
|
import "./index3.js";
|
|
4
4
|
import { useDeactivateTeamMemberMutation as t } from "./index4.js";
|