@tesouro/embedded-components-react 0.11.274 → 0.11.275
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/dist/index.css +61 -7
- package/dist/index.d.ts +1 -13
- package/dist/lib/RecentActivityWidget.d.ts +1 -13
- package/dist/lib/WidgetSuite.d.ts +1 -13
- package/dist/libs/tesouro-embedded-components-react/balance-history-widget/ui/dist/lib/BalanceHistoryCard/BalanceHistoryCard.js +114 -111
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/CreateAccountDialog.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index23.js +69 -69
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/CardControls/SpendLimitControl.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index4.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/recent-activity-widget/feature/dist/lib/RecentActivityWidget/RecentActivityWidgetFeature.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/recent-activity-widget/feature/dist/lib/RecentActivityWidget/labels.js +1 -4
- package/dist/libs/tesouro-embedded-components-react/recent-activity-widget/feature/dist/lib/recentActivityView/buildRecentActivityRows.js +12 -19
- package/dist/libs/tesouro-embedded-components-react/recent-activity-widget/ui/dist/lib/RecentActivityCard/RecentActivityCard.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index15.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index12.js +3 -2
- 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/ui/dist/lib/AttentionStrip/AttentionStrip.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/AttentionStrip/AttentionViewBar.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/DueDateText/DueDateText.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js +16 -14
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellScrollRegion.js +17 -14
- package/dist/packages/shared-ui-shadcn/dist/index.js +448 -417
- package/package.json +1 -1
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index23.js
CHANGED
|
@@ -1,126 +1,126 @@
|
|
|
1
|
-
import { Badge as e, Command as t, CommandGroup as n, CommandInput as r, CommandItem as i, CommandList as a,
|
|
2
|
-
import { mergeVendorSearchComboboxLabels as
|
|
3
|
-
import { useId as
|
|
4
|
-
import { Fragment as
|
|
5
|
-
import { ChevronDown as
|
|
1
|
+
import { Badge as e, Command as t, CommandGroup as n, CommandInput as r, CommandItem as i, CommandList as a, FieldDescription as o, FieldRequirement as s, Label as c, Popover as l, PopoverContent as u, PopoverTrigger as d, Skeleton as f, cn as p } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { mergeVendorSearchComboboxLabels as m } from "./index22.js";
|
|
3
|
+
import { useId as h, useState as g } from "react";
|
|
4
|
+
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
5
|
+
import { ChevronDown as b, Plus as x } from "lucide-react";
|
|
6
6
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index23.js
|
|
7
|
-
var
|
|
8
|
-
function
|
|
9
|
-
let
|
|
10
|
-
return /* @__PURE__ */
|
|
7
|
+
var S = 5, C = "ttw:min-h-44";
|
|
8
|
+
function w({ query: w, onQueryChange: T, results: E, isLoading: D, onAddVendor: O, selectedLabel: k, badge: A, helperText: j, resultsHeading: M, addVendorDescription: N, testId: P, labels: F }) {
|
|
9
|
+
let I = m(F), L = h(), R = h(), [z, B] = g(!1);
|
|
10
|
+
return /* @__PURE__ */ y("div", {
|
|
11
11
|
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
12
|
-
"data-testid":
|
|
12
|
+
"data-testid": P,
|
|
13
13
|
children: [
|
|
14
|
-
/* @__PURE__ */
|
|
15
|
-
htmlFor:
|
|
16
|
-
requirement:
|
|
17
|
-
labels:
|
|
18
|
-
children:
|
|
14
|
+
/* @__PURE__ */ v(c, {
|
|
15
|
+
htmlFor: L,
|
|
16
|
+
requirement: s.Required,
|
|
17
|
+
labels: I.fieldMarkers,
|
|
18
|
+
children: I.fieldLabel
|
|
19
19
|
}),
|
|
20
|
-
/* @__PURE__ */
|
|
20
|
+
/* @__PURE__ */ y(l, {
|
|
21
21
|
modal: !0,
|
|
22
|
-
open:
|
|
23
|
-
onOpenChange:
|
|
24
|
-
children: [/* @__PURE__ */
|
|
22
|
+
open: z,
|
|
23
|
+
onOpenChange: B,
|
|
24
|
+
children: [/* @__PURE__ */ v(d, {
|
|
25
25
|
asChild: !0,
|
|
26
|
-
children: /* @__PURE__ */
|
|
26
|
+
children: /* @__PURE__ */ y("button", {
|
|
27
27
|
type: "button",
|
|
28
|
-
id:
|
|
28
|
+
id: L,
|
|
29
29
|
role: "combobox",
|
|
30
|
-
"aria-expanded":
|
|
31
|
-
"aria-controls":
|
|
30
|
+
"aria-expanded": z,
|
|
31
|
+
"aria-controls": z ? `${L}-options` : void 0,
|
|
32
32
|
"aria-required": !0,
|
|
33
|
-
"aria-describedby":
|
|
33
|
+
"aria-describedby": j ? R : void 0,
|
|
34
34
|
className: "ttw:flex ttw:h-10 ttw:w-full ttw:items-center ttw:justify-between ttw:gap-2 ttw:rounded-md ttw:border ttw:border-border ttw:bg-background ttw:px-3 ttw:text-left ttw:text-sm ttw:shadow-xs ttw:outline-none ttw:focus-visible:border-ring ttw:focus-visible:ring-[3px] ttw:focus-visible:ring-ring/50",
|
|
35
35
|
children: [
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
className:
|
|
38
|
-
children:
|
|
36
|
+
/* @__PURE__ */ v("span", {
|
|
37
|
+
className: p("ttw:min-w-0 ttw:flex-1 ttw:truncate", k ? "ttw:text-foreground" : "ttw:text-muted-foreground"),
|
|
38
|
+
children: k || I.triggerPlaceholder
|
|
39
39
|
}),
|
|
40
|
-
|
|
40
|
+
A ? /* @__PURE__ */ v(e, {
|
|
41
41
|
variant: "secondary",
|
|
42
|
-
children:
|
|
42
|
+
children: A
|
|
43
43
|
}) : null,
|
|
44
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ v(b, {
|
|
45
45
|
"aria-hidden": !0,
|
|
46
46
|
className: "ttw:size-4 ttw:shrink-0 ttw:opacity-50"
|
|
47
47
|
})
|
|
48
48
|
]
|
|
49
49
|
})
|
|
50
|
-
}), /* @__PURE__ */
|
|
51
|
-
id: `${
|
|
50
|
+
}), /* @__PURE__ */ v(u, {
|
|
51
|
+
id: `${L}-options`,
|
|
52
52
|
align: "start",
|
|
53
53
|
className: "ttw:w-[var(--radix-popover-trigger-width)] ttw:p-0",
|
|
54
|
-
children: /* @__PURE__ */
|
|
54
|
+
children: /* @__PURE__ */ y(t, {
|
|
55
55
|
shouldFilter: !1,
|
|
56
|
-
children: [/* @__PURE__ */
|
|
57
|
-
value:
|
|
58
|
-
onValueChange:
|
|
59
|
-
placeholder:
|
|
60
|
-
"aria-label":
|
|
61
|
-
}), /* @__PURE__ */
|
|
62
|
-
className:
|
|
63
|
-
|
|
56
|
+
children: [/* @__PURE__ */ v(r, {
|
|
57
|
+
value: w,
|
|
58
|
+
onValueChange: T,
|
|
59
|
+
placeholder: I.placeholder,
|
|
60
|
+
"aria-label": I.placeholder
|
|
61
|
+
}), /* @__PURE__ */ y(a, {
|
|
62
|
+
className: p("ttw:max-h-72", C),
|
|
63
|
+
"aria-busy": D || void 0,
|
|
64
|
+
children: [D ? /* @__PURE__ */ y("div", {
|
|
64
65
|
className: "ttw:flex ttw:flex-col ttw:gap-2 ttw:p-2",
|
|
65
|
-
|
|
66
|
-
children: [/* @__PURE__ */ y("span", {
|
|
66
|
+
children: [/* @__PURE__ */ v("span", {
|
|
67
67
|
className: "ttw:sr-only",
|
|
68
|
-
children:
|
|
69
|
-
}), Array.from({ length:
|
|
68
|
+
children: I.loading
|
|
69
|
+
}), Array.from({ length: S }).map((e, t) => /* @__PURE__ */ y("div", {
|
|
70
70
|
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4 ttw:px-2 ttw:py-1.5",
|
|
71
|
-
children: [/* @__PURE__ */
|
|
71
|
+
children: [/* @__PURE__ */ v(f, {
|
|
72
72
|
height: 14,
|
|
73
73
|
width: "55%"
|
|
74
|
-
}), /* @__PURE__ */
|
|
74
|
+
}), /* @__PURE__ */ v(f, {
|
|
75
75
|
height: 14,
|
|
76
76
|
width: "30%"
|
|
77
77
|
})]
|
|
78
78
|
}, t))]
|
|
79
|
-
}) :
|
|
80
|
-
className:
|
|
81
|
-
children:
|
|
82
|
-
}) : /* @__PURE__ */
|
|
83
|
-
heading:
|
|
84
|
-
children:
|
|
79
|
+
}) : E.length === 0 ? /* @__PURE__ */ v("div", {
|
|
80
|
+
className: p("ttw:flex ttw:items-center ttw:justify-center ttw:py-6 ttw:text-center ttw:text-sm", C),
|
|
81
|
+
children: I.emptyResults
|
|
82
|
+
}) : /* @__PURE__ */ v(n, {
|
|
83
|
+
heading: M,
|
|
84
|
+
children: E.map((e, t) => /* @__PURE__ */ v(i, {
|
|
85
85
|
value: `${e.name} ${e.email} ${t}`,
|
|
86
86
|
onSelect: () => e.onSelect(),
|
|
87
|
-
children: /* @__PURE__ */
|
|
87
|
+
children: /* @__PURE__ */ y("div", {
|
|
88
88
|
className: "ttw:flex ttw:min-w-0 ttw:flex-col",
|
|
89
|
-
children: [/* @__PURE__ */
|
|
89
|
+
children: [/* @__PURE__ */ v("span", {
|
|
90
90
|
className: "ttw:truncate ttw:text-foreground",
|
|
91
91
|
children: e.name
|
|
92
|
-
}), e.email ? /* @__PURE__ */
|
|
92
|
+
}), e.email ? /* @__PURE__ */ v("span", {
|
|
93
93
|
className: "ttw:truncate ttw:text-xs ttw:text-muted-foreground",
|
|
94
94
|
children: e.email
|
|
95
95
|
}) : null]
|
|
96
96
|
})
|
|
97
97
|
}, `${e.name}:${e.email}:${t}`))
|
|
98
|
-
}),
|
|
98
|
+
}), O ? /* @__PURE__ */ v(_, { children: /* @__PURE__ */ y(i, {
|
|
99
99
|
value: "__add_vendor__",
|
|
100
100
|
onSelect: () => {
|
|
101
|
-
|
|
101
|
+
B(!1), O();
|
|
102
102
|
},
|
|
103
|
-
className: "ttw:sticky ttw:bottom-0 ttw:bg-popover ttw:text-primary",
|
|
104
|
-
children: [/* @__PURE__ */
|
|
103
|
+
className: "ttw:sticky ttw:bottom-0 ttw:border-t ttw:border-border ttw:bg-popover ttw:text-primary",
|
|
104
|
+
children: [/* @__PURE__ */ v(x, { className: "ttw:size-4 ttw:text-primary" }), /* @__PURE__ */ y("div", {
|
|
105
105
|
className: "ttw:flex ttw:min-w-0 ttw:flex-col",
|
|
106
|
-
children: [/* @__PURE__ */
|
|
106
|
+
children: [/* @__PURE__ */ v("span", {
|
|
107
107
|
className: "ttw:truncate",
|
|
108
|
-
children:
|
|
109
|
-
}),
|
|
108
|
+
children: I.addVendorAction
|
|
109
|
+
}), N ? /* @__PURE__ */ v("span", {
|
|
110
110
|
className: "ttw:truncate ttw:text-xs ttw:text-muted-foreground",
|
|
111
|
-
children:
|
|
111
|
+
children: N
|
|
112
112
|
}) : null]
|
|
113
113
|
})]
|
|
114
|
-
})
|
|
114
|
+
}) }) : null]
|
|
115
115
|
})]
|
|
116
116
|
})
|
|
117
117
|
})]
|
|
118
118
|
}),
|
|
119
|
-
|
|
120
|
-
id:
|
|
121
|
-
children:
|
|
119
|
+
j ? /* @__PURE__ */ v(o, {
|
|
120
|
+
id: R,
|
|
121
|
+
children: j
|
|
122
122
|
}) : null
|
|
123
123
|
]
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
|
-
export {
|
|
126
|
+
export { w as VendorSearchCombobox, w as default };
|
|
@@ -9,7 +9,7 @@ function g({ notice: n }) {
|
|
|
9
9
|
if (!n) return null;
|
|
10
10
|
let r = n.variant === "warning";
|
|
11
11
|
return /* @__PURE__ */ p(e, {
|
|
12
|
-
className: r ? "ttw:border-destructive/30 ttw:bg-destructive/5 ttw:text-destructive" : "ttw:border-border ttw:bg-muted ttw:text-foreground",
|
|
12
|
+
className: r ? "ttw:border-destructive/30 ttw:bg-destructive/5 ttw:text-destructive-subtle-foreground" : "ttw:border-border ttw:bg-muted ttw:text-foreground",
|
|
13
13
|
children: [/* @__PURE__ */ f(r ? h : m, { "aria-hidden": !0 }), /* @__PURE__ */ f(t, {
|
|
14
14
|
className: "ttw:text-current",
|
|
15
15
|
children: /* @__PURE__ */ p("p", { children: [n.title ? /* @__PURE__ */ p("span", {
|
|
@@ -84,7 +84,7 @@ function m({ view: m, isDragging: h, disabled: g, inputRef: _, onBrowseClick: v,
|
|
|
84
84
|
}) : /* @__PURE__ */ s(r, {
|
|
85
85
|
variant: "caption",
|
|
86
86
|
role: "alert",
|
|
87
|
-
className: "ttw:text-destructive",
|
|
87
|
+
className: "ttw:text-destructive-subtle-foreground",
|
|
88
88
|
children: t.message
|
|
89
89
|
})]
|
|
90
90
|
}),
|
package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index4.js
CHANGED
|
@@ -31,7 +31,7 @@ function u({ id: t, label: n, value: u, options: d, disabled: f, error: p, onVal
|
|
|
31
31
|
let n = `${t}-${e.value}`, i = u === e.value;
|
|
32
32
|
return /* @__PURE__ */ c(r, {
|
|
33
33
|
htmlFor: n,
|
|
34
|
-
className: o("ttw:flex ttw:cursor-pointer ttw:items-start ttw:gap-3 ttw:font-normal", _ && "ttw:h-full ttw:rounded-lg ttw:border ttw:p-4", _ && (p ? "ttw:border-destructive ttw:bg-card" : i ? "ttw:border-primary ttw:bg-primary/
|
|
34
|
+
className: o("ttw:flex ttw:cursor-pointer ttw:items-start ttw:gap-3 ttw:font-normal", _ && "ttw:h-full ttw:rounded-lg ttw:border ttw:p-4", _ && (p ? "ttw:border-destructive ttw:bg-card" : i ? "ttw:border-primary ttw:bg-primary/5" : "ttw:border-border ttw:bg-card")),
|
|
35
35
|
children: [/* @__PURE__ */ s(a, {
|
|
36
36
|
id: n,
|
|
37
37
|
value: e.value,
|
|
@@ -36,7 +36,7 @@ function C({ labels: a, onTransactionClick: m, className: C, style: w }) {
|
|
|
36
36
|
B,
|
|
37
37
|
F,
|
|
38
38
|
j
|
|
39
|
-
]), H = x(() => h(L ?? [],
|
|
39
|
+
]), H = x(() => h(L ?? [], g(/* @__PURE__ */ new Date())), [L]), U = y((e) => {
|
|
40
40
|
let t = L?.[Number(e)]?.bankAccount.id;
|
|
41
41
|
t && m && (E(p.TransactionClicked), m(t));
|
|
42
42
|
}, [
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { RECENT_ACTIVITY_CARD_LABELS_EN as e } from "../../../../ui/dist/lib/RecentActivityCard/labels.js";
|
|
2
2
|
import "../../../../ui/dist/index.js";
|
|
3
3
|
// ../../libs/tesouro-embedded-components-react/recent-activity-widget/feature/dist/lib/RecentActivityWidget/labels.js
|
|
4
|
-
var t = {
|
|
5
|
-
...e,
|
|
6
|
-
rowAriaLabel: ({ description: e, nickname: t, last4: n, date: r, amount: i }) => `${e}, ${t} ending ${n}, ${r}, ${i}`
|
|
7
|
-
};
|
|
4
|
+
var t = { ...e };
|
|
8
5
|
export { t as RECENT_ACTIVITY_WIDGET_LABELS_EN };
|
|
@@ -39,26 +39,19 @@ function s(i) {
|
|
|
39
39
|
});
|
|
40
40
|
return `${i.direction === "CREDIT" ? "+" : r}${s}`;
|
|
41
41
|
}
|
|
42
|
-
function c(e, t
|
|
43
|
-
return e.map((
|
|
44
|
-
let
|
|
42
|
+
function c(e, t) {
|
|
43
|
+
return e.map((n, r) => {
|
|
44
|
+
let a = i(n.date), c = r === 0 ? t : e[r - 1].date, l = s(n), { nickname: u, accountNumberLast4: d } = n.bankAccount;
|
|
45
45
|
return {
|
|
46
|
-
id: String(
|
|
47
|
-
month:
|
|
48
|
-
day:
|
|
49
|
-
...o(
|
|
50
|
-
date:
|
|
51
|
-
title:
|
|
52
|
-
accountName:
|
|
53
|
-
accountLast4:
|
|
54
|
-
amount:
|
|
55
|
-
ariaLabel: t.rowAriaLabel({
|
|
56
|
-
description: r.description,
|
|
57
|
-
nickname: d,
|
|
58
|
-
last4: f,
|
|
59
|
-
date: c.spoken,
|
|
60
|
-
amount: u
|
|
61
|
-
})
|
|
46
|
+
id: String(r),
|
|
47
|
+
month: a.month,
|
|
48
|
+
day: a.day,
|
|
49
|
+
...o(n.date, c) ? { year: a.year } : {},
|
|
50
|
+
date: a.spoken,
|
|
51
|
+
title: n.description,
|
|
52
|
+
accountName: u,
|
|
53
|
+
accountLast4: d,
|
|
54
|
+
amount: l
|
|
62
55
|
};
|
|
63
56
|
});
|
|
64
57
|
}
|
|
@@ -107,7 +107,6 @@ function _({ rows: s, onRowClick: u, isLoading: _ = !1, isError: v = !1, onRetry
|
|
|
107
107
|
"data-testid": x?.row,
|
|
108
108
|
children: [r > 0 && /* @__PURE__ */ d(e, {}), u ? /* @__PURE__ */ d("button", {
|
|
109
109
|
type: "button",
|
|
110
|
-
"aria-label": t.ariaLabel,
|
|
111
110
|
onClick: () => u(t.id),
|
|
112
111
|
className: n(g, "ttw:cursor-pointer ttw:outline-none ttw:hover:bg-muted ttw:focus-visible:outline-2 ttw:focus-visible:outline-offset-2 ttw:focus-visible:outline-ring ttw:focus-visible:outline-solid"),
|
|
113
112
|
children: /* @__PURE__ */ d(h, {
|
|
@@ -123,9 +123,9 @@ function p({ rows: p, isLoading: m = !1, isError: h = !1, showPagination: g = !1
|
|
|
123
123
|
onRowClick: (e) => e.onSelect(),
|
|
124
124
|
rowAriaLabel: A,
|
|
125
125
|
isRowActionable: (e) => !e.isInactive,
|
|
126
|
-
rowClassName: (e) => e.isInactive ? "ttw:cursor-default ttw:
|
|
126
|
+
rowClassName: (e) => e.isInactive ? "ttw:cursor-default ttw:text-muted-foreground ttw:hover:bg-transparent" : void 0,
|
|
127
127
|
renderCard: !h && p.length > 0 ? (t) => /* @__PURE__ */ d("div", {
|
|
128
|
-
className: r("ttw:flex ttw:flex-col ttw:gap-2", t.isInactive && "ttw:
|
|
128
|
+
className: r("ttw:flex ttw:flex-col ttw:gap-2", t.isInactive && "ttw:text-muted-foreground"),
|
|
129
129
|
children: [
|
|
130
130
|
M(t),
|
|
131
131
|
/* @__PURE__ */ d("div", {
|
package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index12.js
CHANGED
|
@@ -12,11 +12,12 @@ function b({ id: e, label: t }) {
|
|
|
12
12
|
function x({ option: t, isSelected: n, isDisabled: r, reason: o, onToggle: c }) {
|
|
13
13
|
let l = r && !n, u = /* @__PURE__ */ g("label", {
|
|
14
14
|
"data-testid": `approver-option-${t.id}`,
|
|
15
|
-
className: `ttw:flex ttw:w-full ttw:items-center ttw:gap-2 ttw:rounded-sm ttw:px-2 ttw:py-1.5 ttw:text-sm ${r ? "ttw:cursor-not-allowed ttw:
|
|
15
|
+
className: `ttw:flex ttw:w-full ttw:items-center ttw:gap-2 ttw:rounded-sm ttw:px-2 ttw:py-1.5 ttw:text-sm ${r ? "ttw:cursor-not-allowed ttw:text-muted-foreground" : "ttw:cursor-pointer ttw:hover:bg-accent ttw:hover:text-accent-foreground"}`,
|
|
16
16
|
children: [
|
|
17
17
|
/* @__PURE__ */ h(e, {
|
|
18
18
|
checked: n,
|
|
19
19
|
"aria-disabled": l,
|
|
20
|
+
className: r ? "ttw:opacity-50" : void 0,
|
|
20
21
|
onCheckedChange: () => {
|
|
21
22
|
l || c();
|
|
22
23
|
}
|
|
@@ -66,7 +67,7 @@ var S = ({ value: e, options: S, onChange: C, lockedSections: w, lockedOptions:
|
|
|
66
67
|
asChild: !0,
|
|
67
68
|
children: /* @__PURE__ */ g("div", {
|
|
68
69
|
ref: L,
|
|
69
|
-
className: `ttw:flex ttw:min-h-9 ttw:w-full ttw:cursor-text ttw:flex-wrap ttw:items-center ttw:gap-1.5 ttw:rounded-md ttw:border ttw:bg-transparent ttw:px-2.5 ttw:py-1.5 ttw:has-[:disabled]:cursor-not-allowed ttw:has-[:disabled]:
|
|
70
|
+
className: `ttw:flex ttw:min-h-9 ttw:w-full ttw:cursor-text ttw:flex-wrap ttw:items-center ttw:gap-1.5 ttw:rounded-md ttw:border ttw:bg-transparent ttw:px-2.5 ttw:py-1.5 ttw:has-[:disabled]:cursor-not-allowed ttw:has-[:disabled]:bg-muted ${D ? "ttw:border-destructive" : "ttw:border-input"}`,
|
|
70
71
|
children: [
|
|
71
72
|
e.map((e, t) => /* @__PURE__ */ g(l, { children: [t > 0 ? /* @__PURE__ */ h("span", {
|
|
72
73
|
className: "ttw:text-xs ttw:text-muted-foreground",
|
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.275", n = "236170c6af2568317d8d38f784089ab4dca17c4c", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|
|
@@ -5,7 +5,7 @@ var r = {
|
|
|
5
5
|
warning: "ttw:border-warning/40 ttw:bg-warning-subtle ttw:text-warning-foreground ttw:hover:border-warning",
|
|
6
6
|
destructive: "ttw:border-destructive/40 ttw:bg-destructive-subtle ttw:text-destructive-subtle-foreground ttw:hover:border-destructive"
|
|
7
7
|
}, i = {
|
|
8
|
-
warning: "ttw:border-warning ttw:bg-warning ttw:text-
|
|
8
|
+
warning: "ttw:border-warning-foreground ttw:bg-warning-subtle ttw:text-warning-foreground ttw:ring-1 ttw:ring-inset ttw:ring-warning-foreground",
|
|
9
9
|
destructive: "ttw:border-destructive ttw:bg-destructive ttw:text-destructive-foreground"
|
|
10
10
|
};
|
|
11
11
|
function a({ label: a, items: o, className: s }) {
|
|
@@ -3,7 +3,7 @@ import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
|
3
3
|
import { ChevronLeftIcon as a } from "lucide-react";
|
|
4
4
|
// ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/AttentionStrip/AttentionViewBar.js
|
|
5
5
|
var o = {
|
|
6
|
-
warning: "ttw:text-warning",
|
|
6
|
+
warning: "ttw:text-warning-foreground",
|
|
7
7
|
destructive: "ttw:text-destructive"
|
|
8
8
|
};
|
|
9
9
|
function s({ backLabel: s, backAccessibleLabel: c, title: l, tone: u, onBack: d }) {
|
package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/DueDateText/DueDateText.js
CHANGED
|
@@ -5,7 +5,7 @@ function r({ label: r, overdueLabel: i, accessibleLabel: a }) {
|
|
|
5
5
|
return i ? /* @__PURE__ */ t(e, {
|
|
6
6
|
hint: r,
|
|
7
7
|
children: /* @__PURE__ */ n("span", {
|
|
8
|
-
className: "ttw:text-destructive",
|
|
8
|
+
className: "ttw:text-destructive-subtle-foreground",
|
|
9
9
|
children: [/* @__PURE__ */ t("span", {
|
|
10
10
|
"aria-hidden": !0,
|
|
11
11
|
children: i
|
|
@@ -23,27 +23,27 @@ function h({ title: h, subtitle: g, isTitleVisuallyHidden: _ = !1, focusTitleOnM
|
|
|
23
23
|
...R
|
|
24
24
|
}, [V, H] = u.useState(null), U = u.useCallback((e) => {
|
|
25
25
|
H(e);
|
|
26
|
-
}, []), W = u.useRef(null), G = u.useRef(b);
|
|
26
|
+
}, []), W = u.useRef(null), G = u.useId(), K = u.useRef(b);
|
|
27
27
|
u.useEffect(() => {
|
|
28
|
-
if (
|
|
28
|
+
if (K.current === b || (K.current = b, !V)) return;
|
|
29
29
|
let { activeElement: e, body: t } = V.ownerDocument;
|
|
30
30
|
(!e || e === t || V.contains(e)) && W.current?.focus({ preventScroll: !0 }), V.getBoundingClientRect().top < m(V) && V.scrollIntoView({ block: "start" });
|
|
31
31
|
}, [b, V]);
|
|
32
|
-
let
|
|
32
|
+
let q = u.useRef(v);
|
|
33
33
|
u.useEffect(() => {
|
|
34
|
-
|
|
34
|
+
q.current && W.current?.focus();
|
|
35
35
|
}, []);
|
|
36
|
-
let
|
|
36
|
+
let J = u.useMemo(() => ({ container: V }), [V]), Y = P || O, X = j ? /* @__PURE__ */ d(e, {
|
|
37
37
|
type: "button",
|
|
38
38
|
variant: "outline",
|
|
39
|
-
disabled: A ||
|
|
39
|
+
disabled: A || Y,
|
|
40
40
|
onClick: C,
|
|
41
41
|
"aria-label": M,
|
|
42
42
|
"data-testid": z?.back,
|
|
43
43
|
children: B.backButton
|
|
44
44
|
}) : null;
|
|
45
45
|
return /* @__PURE__ */ d(s.Provider, {
|
|
46
|
-
value:
|
|
46
|
+
value: J,
|
|
47
47
|
children: /* @__PURE__ */ f("div", {
|
|
48
48
|
ref: U,
|
|
49
49
|
className: "ttw:relative ttw:grid ttw:max-h-full ttw:w-full ttw:min-h-0 ttw:grid-rows-[auto_1fr_auto] ttw:gap-0 ttw:overflow-hidden ttw:bg-background",
|
|
@@ -54,6 +54,7 @@ function h({ title: h, subtitle: g, isTitleVisuallyHidden: _ = !1, focusTitleOnM
|
|
|
54
54
|
children: [
|
|
55
55
|
/* @__PURE__ */ d(t, {
|
|
56
56
|
variant: "page",
|
|
57
|
+
id: G,
|
|
57
58
|
ref: W,
|
|
58
59
|
tabIndex: -1,
|
|
59
60
|
className: r("ttw:outline-none", _ ? "ttw:sr-only" : "ttw:text-foreground"),
|
|
@@ -68,13 +69,14 @@ function h({ title: h, subtitle: g, isTitleVisuallyHidden: _ = !1, focusTitleOnM
|
|
|
68
69
|
activeStep: b,
|
|
69
70
|
labels: R,
|
|
70
71
|
onStepClick: x,
|
|
71
|
-
isStepClickDisabled:
|
|
72
|
+
isStepClickDisabled: Y,
|
|
72
73
|
stepButtonTestIdPrefix: z?.stepButton
|
|
73
74
|
})
|
|
74
75
|
]
|
|
75
76
|
}),
|
|
76
77
|
/* @__PURE__ */ d(l, {
|
|
77
78
|
activeStep: b,
|
|
79
|
+
labelledBy: G,
|
|
78
80
|
testIds: z?.scrollRegion,
|
|
79
81
|
children: L
|
|
80
82
|
}),
|
|
@@ -98,7 +100,7 @@ function h({ title: h, subtitle: g, isTitleVisuallyHidden: _ = !1, focusTitleOnM
|
|
|
98
100
|
children: [k ? /* @__PURE__ */ f(e, {
|
|
99
101
|
type: "button",
|
|
100
102
|
variant: "ghost",
|
|
101
|
-
disabled:
|
|
103
|
+
disabled: Y,
|
|
102
104
|
onClick: k,
|
|
103
105
|
className: "ttw:max-w-full ttw:whitespace-normal ttw:text-destructive ttw:hover:text-destructive",
|
|
104
106
|
"data-testid": z?.delete,
|
|
@@ -106,14 +108,14 @@ function h({ title: h, subtitle: g, isTitleVisuallyHidden: _ = !1, focusTitleOnM
|
|
|
106
108
|
className: "ttw:size-4",
|
|
107
109
|
"aria-hidden": !0
|
|
108
110
|
}), B.deleteButton]
|
|
109
|
-
}) :
|
|
111
|
+
}) : X, /* @__PURE__ */ f("div", {
|
|
110
112
|
className: "ttw:ml-auto ttw:flex ttw:min-w-0 ttw:max-w-full ttw:flex-wrap ttw:items-center ttw:justify-end ttw:gap-3",
|
|
111
113
|
children: [
|
|
112
|
-
k ?
|
|
114
|
+
k ? X : null,
|
|
113
115
|
T ? /* @__PURE__ */ d(e, {
|
|
114
116
|
type: "button",
|
|
115
117
|
variant: "ghost",
|
|
116
|
-
disabled:
|
|
118
|
+
disabled: Y,
|
|
117
119
|
onClick: T,
|
|
118
120
|
"data-testid": z?.cancel,
|
|
119
121
|
children: B.cancelButton
|
|
@@ -121,7 +123,7 @@ function h({ title: h, subtitle: g, isTitleVisuallyHidden: _ = !1, focusTitleOnM
|
|
|
121
123
|
E ? /* @__PURE__ */ d(e, {
|
|
122
124
|
type: "button",
|
|
123
125
|
variant: "secondary",
|
|
124
|
-
disabled: D ||
|
|
126
|
+
disabled: D || Y,
|
|
125
127
|
loading: O,
|
|
126
128
|
onClick: E,
|
|
127
129
|
"data-testid": z?.saveAndClose,
|
|
@@ -129,7 +131,7 @@ function h({ title: h, subtitle: g, isTitleVisuallyHidden: _ = !1, focusTitleOnM
|
|
|
129
131
|
}) : null,
|
|
130
132
|
/* @__PURE__ */ d(e, {
|
|
131
133
|
type: "button",
|
|
132
|
-
disabled: N ||
|
|
134
|
+
disabled: N || Y,
|
|
133
135
|
loading: P,
|
|
134
136
|
onClick: w,
|
|
135
137
|
"data-testid": z?.next,
|
|
@@ -20,26 +20,29 @@ function a(e) {
|
|
|
20
20
|
}, [e])
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
function o({ activeStep: o,
|
|
24
|
-
let { containerRef:
|
|
23
|
+
function o({ activeStep: o, labelledBy: s, children: c, testIds: l }) {
|
|
24
|
+
let { containerRef: u, hasOverflow: d, fadeVisible: f, fadeHeight: p, resetHint: m } = e(), { mounted: h, visible: g, onTransitionEnd: _ } = a(f);
|
|
25
25
|
return t.useEffect(() => {
|
|
26
|
-
|
|
27
|
-
}, [o,
|
|
28
|
-
ref:
|
|
29
|
-
|
|
30
|
-
"
|
|
26
|
+
m();
|
|
27
|
+
}, [o, m]), /* @__PURE__ */ r("div", {
|
|
28
|
+
ref: u,
|
|
29
|
+
role: "region",
|
|
30
|
+
"aria-labelledby": s,
|
|
31
|
+
tabIndex: 0,
|
|
32
|
+
className: "ttw:relative ttw:min-h-0 ttw:overflow-y-auto ttw:px-8 ttw:pt-2 ttw:outline-none ttw:focus-visible:outline-2 ttw:focus-visible:-outline-offset-2 ttw:focus-visible:outline-ring",
|
|
33
|
+
"data-testid": l?.root,
|
|
31
34
|
children: [/* @__PURE__ */ n("div", {
|
|
32
35
|
className: "ttw:pb-4",
|
|
33
|
-
children:
|
|
34
|
-
}),
|
|
36
|
+
children: c
|
|
37
|
+
}), d && h ? /* @__PURE__ */ n("div", {
|
|
35
38
|
"aria-hidden": !0,
|
|
36
|
-
"data-testid":
|
|
37
|
-
onTransitionEnd:
|
|
39
|
+
"data-testid": l?.fade,
|
|
40
|
+
onTransitionEnd: _,
|
|
38
41
|
className: "ttw:pointer-events-none ttw:sticky ttw:bottom-0 ttw:left-0 ttw:right-0 ttw:z-[1] ttw:transition-opacity ttw:ease-in-out",
|
|
39
42
|
style: {
|
|
40
|
-
height:
|
|
41
|
-
marginTop: `-${
|
|
42
|
-
opacity: +!!
|
|
43
|
+
height: p,
|
|
44
|
+
marginTop: `-${p}px`,
|
|
45
|
+
opacity: +!!g,
|
|
43
46
|
transitionDuration: `${i}ms`,
|
|
44
47
|
background: "linear-gradient(to bottom, transparent 0%, var(--ttw-background) 85%, var(--ttw-background) 100%)"
|
|
45
48
|
}
|