@tesouro/embedded-components-react 0.7.11 → 0.7.12
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 +6 -8
- package/dist/index.d.ts +15 -193
- package/dist/index.js +1 -1
- package/dist/lib/BillPayWidget.d.ts +10 -188
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/lib/CounterpartsWidget.d.ts +1 -1
- package/dist/lib/CounterpartsWidgetPublic.d.ts +1 -1
- package/dist/lib/CustomersWidget.d.ts +1 -2
- package/dist/lib/WidgetSuite.d.ts +4 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/{BillPayWidgetNative/BillPayWidgetNative.js → BillPayWidget/BillPayWidget.js} +4 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/{BillPayWidgetNative → BillPayWidget}/BillsTab.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/index.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/{BillPayWidgetNative → BillPayWidget}/labels.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/{BillPayWidgetNative → BillPayWidget}/testIds.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/customers-widget/feature/dist/lib/CustomersWidgetMonite/CustomersWidgetMonite.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index105.js +53 -53
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index107.js +23 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index108.js +74 -74
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index157.js +30 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index160.js +28 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index243.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index332.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index340.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index360.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index372.js +57 -57
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index374.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index49.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index51.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index65.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index91.js +29 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index97.js +24 -24
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/BillPaySection.js +7 -11
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget.js +0 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidgetMonite/BillPayWidgetMonite.js +0 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidgetMonite/index.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidgetNative/index.js +0 -1
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { useAnalyticsTrack as e } from "../../../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
6
6
|
import "../../../../../shared/feature/dist/index.js";
|
|
7
|
-
import {
|
|
7
|
+
import { CustomersWidgetAnalyticsEvent as t, WIDGET_NAME as n } from "../analytics/events.js";
|
|
8
|
+
import { Counterparts as r } from "../../../../../monite-sdk/dist/index162.js";
|
|
8
9
|
import "../../../../../monite-sdk/dist/index.js";
|
|
9
|
-
import { MoniteRegionProvider as
|
|
10
|
+
import { MoniteRegionProvider as i } from "../../../../../shared/monite-wrapper/feature/dist/lib/MoniteRegionProvider.js";
|
|
10
11
|
import "../../../../../shared/monite-wrapper/feature/dist/index.js";
|
|
11
|
-
import { CustomersWidgetAnalyticsEvent as r, WIDGET_NAME as i } from "../analytics/events.js";
|
|
12
12
|
import { useEffect as a } from "react";
|
|
13
13
|
import { jsx as o } from "react/jsx-runtime";
|
|
14
14
|
//#region ../../libs/tesouro-embedded-components-react/customers-widget/feature/dist/lib/CustomersWidgetMonite/CustomersWidgetMonite.js
|
|
@@ -16,8 +16,8 @@ var s = (e) => e;
|
|
|
16
16
|
function c({ onViewAllDocuments: n, onCreateDocument: i, pageTitleComponent: c = s }) {
|
|
17
17
|
let l = e();
|
|
18
18
|
return a(() => {
|
|
19
|
-
l(
|
|
20
|
-
}, [l]), /* @__PURE__ */ o(
|
|
19
|
+
l(t.Mounted);
|
|
20
|
+
}, [l]), /* @__PURE__ */ o(r, {
|
|
21
21
|
type: "customer",
|
|
22
22
|
pageTitleComponent: c,
|
|
23
23
|
onCreateInvoiceForCustomer: i && ((e) => i({
|
|
@@ -31,9 +31,9 @@ function c({ onViewAllDocuments: n, onCreateDocument: i, pageTitleComponent: c =
|
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
function l({ onViewAllDocuments: e, onCreateDocument: t, pageTitleComponent: r, ...a }) {
|
|
34
|
-
return /* @__PURE__ */ o(
|
|
34
|
+
return /* @__PURE__ */ o(i, {
|
|
35
35
|
...a,
|
|
36
|
-
widgetName:
|
|
36
|
+
widgetName: n,
|
|
37
37
|
children: /* @__PURE__ */ o(c, {
|
|
38
38
|
onViewAllDocuments: e,
|
|
39
39
|
onCreateDocument: t,
|
|
@@ -5,122 +5,122 @@ import { USStatesEnum as o } from "./index99.js";
|
|
|
5
5
|
import { Select as s, SelectContent as c, SelectItem as l, SelectTrigger as u, SelectValue as d } from "./index100.js";
|
|
6
6
|
import { MoniteCountryShadcn as f } from "./index104.js";
|
|
7
7
|
import { useRef as p } from "react";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
8
|
+
import { twMerge as m } from "tailwind-merge";
|
|
9
|
+
import { Fragment as h, jsx as g, jsxs as _ } from "@emotion/react/jsx-runtime";
|
|
10
|
+
import { useLingui as v } from "@lingui/react";
|
|
11
11
|
import { Controller as y, useFormContext as b } from "react-hook-form";
|
|
12
12
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index105.js
|
|
13
13
|
var x = ({ hasExistingAddress: x, isLoading: S, isStandalone: C, customerType: w }) => {
|
|
14
|
-
let { i18n: T } =
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
className:
|
|
14
|
+
let { i18n: T } = v(), { watch: E, control: D } = b(), O = p(null), k = w === "vendor";
|
|
15
|
+
return /* @__PURE__ */ _("div", {
|
|
16
|
+
className: m("ttw:flex ttw:flex-col ttw:gap-4"),
|
|
17
17
|
ref: O,
|
|
18
18
|
children: [
|
|
19
|
-
C ? /* @__PURE__ */
|
|
19
|
+
C ? /* @__PURE__ */ g("div", {
|
|
20
20
|
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-3 ttw:pt-6 ttw:pb-7 ttw:border-b ttw:border-border",
|
|
21
|
-
children: /* @__PURE__ */
|
|
21
|
+
children: /* @__PURE__ */ g(t, {
|
|
22
22
|
variant: "body1",
|
|
23
23
|
className: "ttw:font-medium",
|
|
24
24
|
children: x ? T._("Editing address") : T._("Adding address")
|
|
25
25
|
})
|
|
26
|
-
}) : /* @__PURE__ */ h
|
|
26
|
+
}) : /* @__PURE__ */ g(h, { children: !k && /* @__PURE__ */ g("div", {
|
|
27
27
|
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-3 ttw:pt-6 ttw:pb-7 ttw:border-b ttw:border-border",
|
|
28
|
-
children: /* @__PURE__ */
|
|
28
|
+
children: /* @__PURE__ */ _(t, {
|
|
29
29
|
variant: "body1",
|
|
30
30
|
className: "ttw:font-medium",
|
|
31
31
|
children: [
|
|
32
32
|
T._("Address"),
|
|
33
33
|
" ",
|
|
34
|
-
/* @__PURE__ */
|
|
34
|
+
/* @__PURE__ */ g("span", {
|
|
35
35
|
className: "ttw:text-muted-foreground",
|
|
36
36
|
children: T._("(optional)")
|
|
37
37
|
})
|
|
38
38
|
]
|
|
39
39
|
})
|
|
40
40
|
}) }),
|
|
41
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ _("div", {
|
|
42
42
|
className: "ttw:flex ttw:gap-4",
|
|
43
|
-
children: [/* @__PURE__ */
|
|
43
|
+
children: [/* @__PURE__ */ g(y, {
|
|
44
44
|
name: "line1",
|
|
45
45
|
control: D,
|
|
46
|
-
render: ({ field: t, fieldState: { error: o } }) => /* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */
|
|
46
|
+
render: ({ field: t, fieldState: { error: o } }) => /* @__PURE__ */ g(n, { children: /* @__PURE__ */ _(r, { children: [
|
|
47
|
+
/* @__PURE__ */ g(a, {
|
|
48
48
|
htmlFor: t.name,
|
|
49
49
|
children: T._("Street address")
|
|
50
50
|
}),
|
|
51
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ g(e, {
|
|
52
52
|
id: t.name,
|
|
53
53
|
...t,
|
|
54
54
|
className: C || k ? "ttw:bg-white" : "",
|
|
55
55
|
disabled: S,
|
|
56
56
|
"aria-invalid": !!o || void 0
|
|
57
57
|
}),
|
|
58
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ g(i, { errors: [o] })
|
|
59
59
|
] }) })
|
|
60
|
-
}), /* @__PURE__ */
|
|
60
|
+
}), /* @__PURE__ */ g(y, {
|
|
61
61
|
name: "line2",
|
|
62
62
|
control: D,
|
|
63
|
-
render: ({ field: o, fieldState: { error: s } }) => /* @__PURE__ */
|
|
64
|
-
/* @__PURE__ */
|
|
63
|
+
render: ({ field: o, fieldState: { error: s } }) => /* @__PURE__ */ g(n, { children: /* @__PURE__ */ _(r, { children: [
|
|
64
|
+
/* @__PURE__ */ _(a, {
|
|
65
65
|
htmlFor: o.name,
|
|
66
66
|
className: "ttw:gap-1",
|
|
67
|
-
children: [T._("Apt, suite, floor, etc."), k && /* @__PURE__ */
|
|
67
|
+
children: [T._("Apt, suite, floor, etc."), k && /* @__PURE__ */ g(t, {
|
|
68
68
|
variant: "body2",
|
|
69
69
|
color: "muted",
|
|
70
70
|
className: "ttw:leading-snug",
|
|
71
71
|
children: T._("(optional)")
|
|
72
72
|
})]
|
|
73
73
|
}),
|
|
74
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ g(e, {
|
|
75
75
|
id: o.name,
|
|
76
76
|
...o,
|
|
77
77
|
className: C || k ? "ttw:bg-white" : "",
|
|
78
78
|
disabled: S,
|
|
79
79
|
"aria-invalid": !!s || void 0
|
|
80
80
|
}),
|
|
81
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ g(i, { errors: [s] })
|
|
82
82
|
] }) })
|
|
83
83
|
})]
|
|
84
84
|
}),
|
|
85
|
-
/* @__PURE__ */
|
|
85
|
+
/* @__PURE__ */ _("div", {
|
|
86
86
|
className: "ttw:flex ttw:gap-4",
|
|
87
|
-
children: [/* @__PURE__ */
|
|
87
|
+
children: [/* @__PURE__ */ g(y, {
|
|
88
88
|
name: "city",
|
|
89
89
|
control: D,
|
|
90
|
-
render: ({ field: t, fieldState: { error: o } }) => /* @__PURE__ */
|
|
91
|
-
/* @__PURE__ */
|
|
90
|
+
render: ({ field: t, fieldState: { error: o } }) => /* @__PURE__ */ g(n, { children: /* @__PURE__ */ _(r, { children: [
|
|
91
|
+
/* @__PURE__ */ g(a, {
|
|
92
92
|
htmlFor: t.name,
|
|
93
93
|
children: T._("City")
|
|
94
94
|
}),
|
|
95
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ g(e, {
|
|
96
96
|
id: t.name,
|
|
97
97
|
...t,
|
|
98
98
|
className: C || k ? "ttw:bg-white" : "",
|
|
99
99
|
disabled: S,
|
|
100
100
|
"aria-invalid": !!o || void 0
|
|
101
101
|
}),
|
|
102
|
-
/* @__PURE__ */
|
|
102
|
+
/* @__PURE__ */ g(i, { errors: [o] })
|
|
103
103
|
] }) })
|
|
104
|
-
}), /* @__PURE__ */
|
|
104
|
+
}), /* @__PURE__ */ g(y, {
|
|
105
105
|
name: "state",
|
|
106
106
|
control: D,
|
|
107
|
-
render: ({ field: t, fieldState: { error: f } }) => E("country") === "US" ? /* @__PURE__ */
|
|
108
|
-
/* @__PURE__ */
|
|
107
|
+
render: ({ field: t, fieldState: { error: f } }) => E("country") === "US" ? /* @__PURE__ */ g(n, { children: /* @__PURE__ */ _(r, { children: [
|
|
108
|
+
/* @__PURE__ */ g(a, {
|
|
109
109
|
htmlFor: t.name,
|
|
110
110
|
children: T._("State")
|
|
111
111
|
}),
|
|
112
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ _(s, {
|
|
113
113
|
value: t.value ?? void 0,
|
|
114
114
|
onValueChange: t.onChange,
|
|
115
115
|
disabled: S,
|
|
116
|
-
children: [/* @__PURE__ */
|
|
116
|
+
children: [/* @__PURE__ */ g(u, {
|
|
117
117
|
ref: t.ref,
|
|
118
118
|
onBlur: t.onBlur,
|
|
119
119
|
"aria-invalid": !!f || void 0,
|
|
120
|
-
className:
|
|
120
|
+
className: m("ttw:w-full", (C || k) && "ttw:bg-white"),
|
|
121
121
|
disabled: S,
|
|
122
|
-
children: /* @__PURE__ */
|
|
123
|
-
}), /* @__PURE__ */
|
|
122
|
+
children: /* @__PURE__ */ g(d, { placeholder: T._("Select a state") })
|
|
123
|
+
}), /* @__PURE__ */ g(c, { children: Object.entries(o).map(([e, t]) => /* @__PURE__ */ _(l, {
|
|
124
124
|
value: e,
|
|
125
125
|
children: [
|
|
126
126
|
t,
|
|
@@ -129,48 +129,48 @@ var x = ({ hasExistingAddress: x, isLoading: S, isStandalone: C, customerType: w
|
|
|
129
129
|
]
|
|
130
130
|
}, e)) })]
|
|
131
131
|
}),
|
|
132
|
-
/* @__PURE__ */
|
|
133
|
-
] }) }) : /* @__PURE__ */
|
|
134
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ g(i, { errors: [f] })
|
|
133
|
+
] }) }) : /* @__PURE__ */ g(n, { children: /* @__PURE__ */ _(r, { children: [
|
|
134
|
+
/* @__PURE__ */ g(a, {
|
|
135
135
|
htmlFor: t.name,
|
|
136
136
|
children: T._("State")
|
|
137
137
|
}),
|
|
138
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ g(e, {
|
|
139
139
|
id: t.name,
|
|
140
140
|
...t,
|
|
141
141
|
className: C || k ? "ttw:bg-white" : "",
|
|
142
142
|
disabled: S,
|
|
143
143
|
"aria-invalid": !!f || void 0
|
|
144
144
|
}),
|
|
145
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ g(i, { errors: [f] })
|
|
146
146
|
] }) })
|
|
147
147
|
})]
|
|
148
148
|
}),
|
|
149
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ _("div", {
|
|
150
150
|
className: "ttw:flex ttw:gap-4",
|
|
151
|
-
children: [/* @__PURE__ */
|
|
151
|
+
children: [/* @__PURE__ */ g(y, {
|
|
152
152
|
name: "postalCode",
|
|
153
153
|
control: D,
|
|
154
|
-
render: ({ field: t, fieldState: { error: o } }) => /* @__PURE__ */
|
|
155
|
-
/* @__PURE__ */
|
|
154
|
+
render: ({ field: t, fieldState: { error: o } }) => /* @__PURE__ */ g(n, { children: /* @__PURE__ */ _(r, { children: [
|
|
155
|
+
/* @__PURE__ */ g(a, {
|
|
156
156
|
htmlFor: t.name,
|
|
157
157
|
children: T._("Postal code")
|
|
158
158
|
}),
|
|
159
|
-
/* @__PURE__ */
|
|
159
|
+
/* @__PURE__ */ g(e, {
|
|
160
160
|
id: t.name,
|
|
161
161
|
...t,
|
|
162
162
|
className: C || k ? "ttw:bg-white" : "",
|
|
163
163
|
disabled: S,
|
|
164
164
|
"aria-invalid": !!o || void 0
|
|
165
165
|
}),
|
|
166
|
-
/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ g(i, { errors: [o] })
|
|
167
167
|
] }) })
|
|
168
|
-
}), /* @__PURE__ */
|
|
168
|
+
}), /* @__PURE__ */ g(y, {
|
|
169
169
|
name: "country",
|
|
170
170
|
control: D,
|
|
171
|
-
render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
-
/* @__PURE__ */
|
|
171
|
+
render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ g(n, { children: /* @__PURE__ */ _(r, { children: [
|
|
172
|
+
/* @__PURE__ */ g(a, { children: T._("Country") }),
|
|
173
|
+
/* @__PURE__ */ g(f, {
|
|
174
174
|
value: e.value,
|
|
175
175
|
className: C || k ? "ttw:bg-white" : "",
|
|
176
176
|
onChange: e.onChange,
|
|
@@ -179,7 +179,7 @@ var x = ({ hasExistingAddress: x, isLoading: S, isStandalone: C, customerType: w
|
|
|
179
179
|
container: O?.current,
|
|
180
180
|
allowedCountries: ["US"]
|
|
181
181
|
}),
|
|
182
|
-
/* @__PURE__ */
|
|
182
|
+
/* @__PURE__ */ g(i, { errors: [t] })
|
|
183
183
|
] }) })
|
|
184
184
|
})]
|
|
185
185
|
})
|
|
@@ -4,93 +4,93 @@ import { CounterpartAddressFormContent as n } from "./index105.js";
|
|
|
4
4
|
import { CounterpartAddressForm as r } from "./index106.js";
|
|
5
5
|
import { useState as i } from "react";
|
|
6
6
|
import { Plus as a } from "lucide-react";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { twMerge as o } from "tailwind-merge";
|
|
8
|
+
import { Fragment as s, jsx as c, jsxs as l } from "@emotion/react/jsx-runtime";
|
|
9
|
+
import { useLingui as u } from "@lingui/react";
|
|
10
10
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index107.js
|
|
11
11
|
var d = ({ isStandalone: d, counterpartId: f, counterpartAddress: p, isUpdateAllowed: m, isLoading: h, customerType: g }) => {
|
|
12
|
-
let { i18n: _ } =
|
|
12
|
+
let { i18n: _ } = u(), [v, y] = i(!d), b = !!p, x = p?.city || "", S = p?.state || "", C = p?.postal_code || "", w = () => {
|
|
13
13
|
y(!1);
|
|
14
14
|
};
|
|
15
|
-
return v ? /* @__PURE__ */ s
|
|
15
|
+
return v ? /* @__PURE__ */ c(s, { children: d && f ? /* @__PURE__ */ c(s, { children: p ? /* @__PURE__ */ c(r, {
|
|
16
16
|
address: p,
|
|
17
17
|
handleClose: w,
|
|
18
18
|
counterpartId: f,
|
|
19
19
|
onUpdate: w,
|
|
20
20
|
isStandalone: !0,
|
|
21
21
|
customerType: g
|
|
22
|
-
}) : /* @__PURE__ */
|
|
22
|
+
}) : /* @__PURE__ */ c(r, {
|
|
23
23
|
handleClose: w,
|
|
24
24
|
counterpartId: f,
|
|
25
25
|
onCreate: w,
|
|
26
26
|
isStandalone: !0,
|
|
27
27
|
customerType: g
|
|
28
|
-
}) }) : /* @__PURE__ */
|
|
28
|
+
}) }) : /* @__PURE__ */ c(n, {
|
|
29
29
|
hasExistingAddress: !1,
|
|
30
30
|
isLoading: h,
|
|
31
31
|
isStandalone: !1,
|
|
32
32
|
customerType: g
|
|
33
|
-
}) }) : /* @__PURE__ */
|
|
33
|
+
}) }) : /* @__PURE__ */ l("div", {
|
|
34
34
|
className: "ttw:flex ttw:flex-col",
|
|
35
|
-
children: [/* @__PURE__ */
|
|
35
|
+
children: [/* @__PURE__ */ l("div", {
|
|
36
36
|
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-3 ttw:pt-6 ttw:pb-7",
|
|
37
|
-
children: [/* @__PURE__ */
|
|
37
|
+
children: [/* @__PURE__ */ l(t, {
|
|
38
38
|
variant: "body1",
|
|
39
39
|
className: "ttw:font-medium",
|
|
40
40
|
children: [
|
|
41
41
|
_._("Address"),
|
|
42
42
|
" ",
|
|
43
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ c("span", {
|
|
44
44
|
className: "ttw:text-muted-foreground",
|
|
45
45
|
children: _._("(optional)")
|
|
46
46
|
})
|
|
47
47
|
]
|
|
48
|
-
}), b && m && /* @__PURE__ */
|
|
48
|
+
}), b && m && /* @__PURE__ */ c(e, {
|
|
49
49
|
type: "button",
|
|
50
50
|
variant: "ghost",
|
|
51
51
|
className: "ttw:text-primary ttw:p-0 ttw:hover:text-primary ttw:hover:underline ttw:w-fit ttw:hover:bg-transparent",
|
|
52
52
|
onClick: () => y(!0),
|
|
53
53
|
children: _._("Edit")
|
|
54
54
|
})]
|
|
55
|
-
}), /* @__PURE__ */
|
|
56
|
-
className:
|
|
57
|
-
children: b ? /* @__PURE__ */
|
|
55
|
+
}), /* @__PURE__ */ c("div", {
|
|
56
|
+
className: o("ttw:flex ttw:items-start ttw:rounded-lg", b ? "ttw:border-none" : "ttw:border ttw:border-border ttw:p-3"),
|
|
57
|
+
children: b ? /* @__PURE__ */ l("div", {
|
|
58
58
|
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
59
59
|
children: [
|
|
60
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ c(t, {
|
|
61
61
|
variant: "body2",
|
|
62
62
|
className: "ttw:font-medium",
|
|
63
63
|
children: p?.line1
|
|
64
64
|
}),
|
|
65
|
-
p?.line2 && /* @__PURE__ */
|
|
65
|
+
p?.line2 && /* @__PURE__ */ c(t, {
|
|
66
66
|
variant: "body2",
|
|
67
67
|
className: "ttw:font-medium",
|
|
68
68
|
children: p.line2
|
|
69
69
|
}),
|
|
70
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ c(t, {
|
|
71
71
|
variant: "body2",
|
|
72
72
|
className: "ttw:font-medium",
|
|
73
73
|
children: `${x && x}${x && (S || C) && ","} ${S && S} ${C && C}`
|
|
74
74
|
}),
|
|
75
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ c(t, {
|
|
76
76
|
variant: "body2",
|
|
77
77
|
className: "ttw:font-medium",
|
|
78
78
|
children: p?.country
|
|
79
79
|
})
|
|
80
80
|
]
|
|
81
|
-
}) : /* @__PURE__ */
|
|
81
|
+
}) : /* @__PURE__ */ l("div", {
|
|
82
82
|
className: "ttw:flex ttw:flex-col ttw:gap-0.5",
|
|
83
|
-
children: [/* @__PURE__ */
|
|
83
|
+
children: [/* @__PURE__ */ c(t, {
|
|
84
84
|
variant: "body2",
|
|
85
85
|
className: "ttw:leading-5",
|
|
86
86
|
children: _._("No address on file")
|
|
87
|
-
}), /* @__PURE__ */
|
|
87
|
+
}), /* @__PURE__ */ l(e, {
|
|
88
88
|
type: "button",
|
|
89
89
|
variant: "ghost",
|
|
90
90
|
className: "ttw:text-primary ttw:hover:text-primary/70 ttw:w-fit ttw:px-0 ttw:has-[>svg]:px-0 ttw:py-2 ttw:hover:bg-transparent",
|
|
91
91
|
onClick: () => y(!0),
|
|
92
92
|
disabled: h,
|
|
93
|
-
children: [/* @__PURE__ */
|
|
93
|
+
children: [/* @__PURE__ */ c(a, {}), _._("Add address")]
|
|
94
94
|
})]
|
|
95
95
|
})
|
|
96
96
|
})]
|