@test-glide/glide-payment 0.0.1

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.
@@ -0,0 +1,608 @@
1
+ import { jsx as Q } from "react/jsx-runtime";
2
+ import { useRef as X, useEffect as ee } from "react";
3
+ function p(n, e = {}) {
4
+ const t = document.createElement(n), { className: o, id: s, innerHTML: m, textContent: r, attributes: c, styles: d, dataset: i, children: l, events: h } = e;
5
+ if (o) {
6
+ const u = Array.isArray(o) ? o : o.split(" ");
7
+ t.classList.add(...u.filter(Boolean));
8
+ }
9
+ if (s && (t.id = s), m && (t.innerHTML = m), r && (t.textContent = r), c)
10
+ for (const [u, a] of Object.entries(c))
11
+ a && t.setAttribute(u, a);
12
+ if (d)
13
+ for (const [u, a] of Object.entries(d))
14
+ t.style[u] = a;
15
+ if (i)
16
+ for (const [u, a] of Object.entries(i))
17
+ t.dataset[u] = a;
18
+ if (l && t.append(...l.filter(Boolean)), h)
19
+ for (const [u, a] of Object.entries(h))
20
+ t.addEventListener(u, a);
21
+ return t;
22
+ }
23
+ function x(n, e) {
24
+ const t = "id" in n ? [document.getElementById(n.id)].filter(Boolean) : "className" in n ? Array.from(document.getElementsByClassName(n.className)) : [n.element];
25
+ if (!t.length) {
26
+ console.warn("updateElements: no elements found for", n);
27
+ return;
28
+ }
29
+ for (const o of t) {
30
+ const { styles: s, attributes: m, dataset: r, innerHTML: c, textContent: d, className: i } = e;
31
+ if (s)
32
+ for (const [l, h] of Object.entries(s))
33
+ o.style[l] = h;
34
+ if (m)
35
+ for (const [l, h] of Object.entries(m))
36
+ o.setAttribute(l, h);
37
+ if (r)
38
+ for (const [l, h] of Object.entries(r))
39
+ o.dataset[l] = h;
40
+ if (c !== void 0 && (o.innerHTML = c), d !== void 0 && (o.textContent = d), i?.add) {
41
+ const l = Array.isArray(i.add) ? i.add : [i.add];
42
+ o.classList.add(...l);
43
+ }
44
+ if (i?.remove) {
45
+ const l = Array.isArray(i.remove) ? i.remove : [i.remove];
46
+ o.classList.remove(...l);
47
+ }
48
+ i?.toggle && (Array.isArray(i.toggle) ? i.toggle : [i.toggle]).forEach((h) => o.classList.toggle(h));
49
+ }
50
+ }
51
+ const te = `
52
+ <svg
53
+ xmlns="http://www.w3.org/2000/svg"
54
+ width="16"
55
+ height="16"
56
+ fill="none"
57
+ viewBox="0 0 16 16"
58
+ >
59
+ <path
60
+ fill="#000"
61
+ fill-rule="evenodd"
62
+ d="M8 2.667a2 2 0 0 0-2 2v2h4v-2a2 2 0 0 0-2-2m3.333 4v-2a3.333 3.333 0 0 0-6.666 0v2a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h6.666a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2M4.667 8.001A.667.667 0 0 0 4 8.667v4c0 .369.298.667.667.667h6.666a.667.667 0 0 0 .667-.667v-4a.667.667 0 0 0-.667-.666zm2 2.666a1.333 1.333 0 1 1 2.666 0 1.333 1.333 0 0 1-2.666 0"
63
+ clip-rule="evenodd"
64
+ ></path>
65
+ </svg>
66
+ `, ne = `
67
+ <svg
68
+ xmlns="http://www.w3.org/2000/svg"
69
+ width="16"
70
+ height="16"
71
+ fill="none"
72
+ stroke="currentColor"
73
+ stroke-linecap="round"
74
+ stroke-linejoin="round"
75
+ stroke-width="2"
76
+ class="lucide lucide-loader-icon lucide-loader"
77
+ viewBox="0 0 24 24"
78
+ >
79
+ <path d="M12 2v4M16.2 7.8l2.9-2.9M18 12h4M16.2 16.2l2.9 2.9M12 18v4M4.9 19.1l2.9-2.9M2 12h4M4.9 4.9l2.9 2.9"></path>
80
+ </svg>
81
+ `, re = `<svg
82
+ xmlns="http://www.w3.org/2000/svg"
83
+ width="20"
84
+ height="20"
85
+ fill="none"
86
+ viewBox="0 0 24 24"
87
+ >
88
+ <path
89
+ fill="#071B32"
90
+ d="M9.709 21.493a.44.44 0 0 1-.325-.146l-8.25-9a.533.533 0 0 1 0-.707l8.25-9a.432.432 0 0 1 .648.013.53.53 0 0 1 0 .694l-7.925 8.646 7.925 8.646c.18.195.18.512 0 .707a.44.44 0 0 1-.323.147"
91
+ ></path>
92
+ <path
93
+ fill="#071B32"
94
+ d="M22.542 12.494H1.459c-.253 0-.459-.224-.459-.5s.206-.5.459-.5h21.083c.253 0 .458.224.458.5s-.205.5-.458.5"
95
+ ></path>
96
+ </svg>`, k = `
97
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 256 256"><path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path></svg>
98
+ `, se = ({ children: n, onClick: e, disabled: t = !1, size: o = "medium", type: s = "button", className: m = "", variant: r = "primary" }) => {
99
+ const c = p("span", {
100
+ className: "button-spinner",
101
+ innerHTML: ne,
102
+ dataset: { show: "false" }
103
+ }), d = p("span", {
104
+ className: "button-label",
105
+ children: [
106
+ null
107
+ ],
108
+ textContent: n
109
+ }), i = p("button", {
110
+ className: `custom-button ${r} ${o} ${m}`,
111
+ attributes: {
112
+ type: s,
113
+ ...t ? { disabled: "true" } : {}
114
+ },
115
+ events: {
116
+ click: e
117
+ },
118
+ children: [
119
+ c,
120
+ d
121
+ ]
122
+ }), l = (u = !1) => {
123
+ x({ element: c }, {
124
+ dataset: { show: String(u) }
125
+ }), h(u);
126
+ }, h = (u = !1) => {
127
+ u ? i.setAttribute("disabled", "true") : i.removeAttribute("disabled");
128
+ };
129
+ return {
130
+ element: i,
131
+ setLoading: l,
132
+ setDisabled: h
133
+ };
134
+ }, oe = ({ content: n, position: e = "top", delay: t = 200, maxWidth: o = 250, className: s = "", id: m = "" }) => {
135
+ var r = p("div", {
136
+ className: `tooltip ${e} ${s}`,
137
+ styles: {
138
+ // top: `${tooltipPosition.top}px`,
139
+ // left: `${tooltipPosition.left}px`,
140
+ maxWidth: `${o}px`
141
+ },
142
+ attributes: {
143
+ role: "tooltip"
144
+ },
145
+ dataset: { show: "false" },
146
+ innerHTML: `
147
+ <div class="tooltip-content">${n}</div>
148
+ <div class="tooltip-arrow"></div>
149
+ `
150
+ });
151
+ let c = null;
152
+ var l = p("span", {
153
+ className: "tooltip-trigger",
154
+ innerHTML: k,
155
+ events: {
156
+ mouseenter: () => {
157
+ t > 0 ? c = window.setTimeout(() => {
158
+ r.dataset.show = "true", h();
159
+ }, t) : (r.dataset.show = "true", h());
160
+ },
161
+ mouseleave: () => {
162
+ c && clearTimeout(c), r.dataset.show = "false";
163
+ }
164
+ }
165
+ });
166
+ function h() {
167
+ if (!l || !r) return;
168
+ const a = l.getBoundingClientRect(), v = r.getBoundingClientRect(), y = 8;
169
+ let w, g;
170
+ switch (e) {
171
+ case "top":
172
+ w = a.top - v.height - y, g = a.left + a.width / 2 - v.width / 2;
173
+ break;
174
+ case "bottom":
175
+ w = a.bottom + y, g = a.left + a.width / 2 - v.width / 2;
176
+ break;
177
+ case "left":
178
+ w = a.top + a.height / 2 - v.height / 2, g = a.left - v.width - y;
179
+ break;
180
+ case "right":
181
+ w = a.top + a.height / 2 - v.height / 2, g = a.right + y;
182
+ break;
183
+ default:
184
+ w = a.top - v.height - y, g = a.left + a.width / 2 - v.width / 2;
185
+ }
186
+ const N = window.innerWidth, M = window.innerHeight;
187
+ g < 0 && (g = y), g + v.width > N && (g = N - v.width - y), w < 0 && (w = y), w + v.height > M && (w = M - v.height - y), r.style.top = `${w}px`, r.style.left = `${g}px`;
188
+ }
189
+ return p("div", {
190
+ className: "tooltip-wrapper",
191
+ id: `tooltip-${m}`,
192
+ children: [
193
+ l,
194
+ r
195
+ ]
196
+ });
197
+ }, ae = (n) => {
198
+ const e = {}, t = Object.values(n).every(
199
+ (s) => !s || s.trim() === ""
200
+ ), o = n.cardNumber?.replace(/\s/g, "");
201
+ if (o ? /^\d{13,19}$/.test(o) || (e.cardNumber = "Card number must be 13-19 digits") : e.cardNumber = "Card number is required", !n.expiryDate)
202
+ e.expiryDate = "Expiry date is required";
203
+ else {
204
+ const s = n.expiryDate.replace(/\D/g, "");
205
+ if (s.length < 4)
206
+ e.expiryDate = "Enter complete expiry date (MM/YY)";
207
+ else {
208
+ const m = parseInt(s.substring(0, 2), 10), r = parseInt(s.substring(2, 4), 10);
209
+ if (isNaN(m) || m < 1 || m > 12)
210
+ e.expiryDate = "Invalid month (must be 01-12)";
211
+ else if (isNaN(r) || r < 0 || r > 99)
212
+ e.expiryDate = "Invalid year";
213
+ else {
214
+ const c = /* @__PURE__ */ new Date(), d = c.getFullYear(), i = c.getMonth() + 1, l = Math.floor(d / 100) * 100, h = l + r, u = l + 100 + r;
215
+ let a;
216
+ h >= d && h <= d + 20 ? a = h : (u >= d && u <= d + 20, a = u), a < d || a === d && m < i ? e.expiryDate = "Card has expired" : a > d + 20 && (e.expiryDate = "Expiry year is too far in the future");
217
+ }
218
+ }
219
+ }
220
+ return n.cvv?.trim() ? /^\d{3,4}$/.test(n.cvv.trim()) || (e.cvv = "CVV must be 3 or 4 digits") : e.cvv = "CVV is required", n.zipCode?.trim() ? /^[A-Z0-9\s-]{3,10}$/i.test(n.zipCode.trim()) || (e.zipCode = "Invalid ZIP code format") : e.zipCode = "Postal code is required", {
221
+ isValid: Object.keys(e).length === 0,
222
+ errors: e,
223
+ isEmpty: t
224
+ };
225
+ };
226
+ function ie(n) {
227
+ const e = parseInt(n, 10);
228
+ if (isNaN(e) || e < 0 || e > 99) return null;
229
+ const t = (/* @__PURE__ */ new Date()).getFullYear(), o = Math.floor(t / 100) * 100;
230
+ let s = o + e;
231
+ return s >= t && s <= t + 20 || (s = o + 100 + e, s >= t && s <= t + 20) ? s : o + 100 + e;
232
+ }
233
+ function V(n = "") {
234
+ return n.trim().replaceAll(/\s/g, "").replaceAll("-", "");
235
+ }
236
+ const le = {
237
+ card: (n) => n.replace(/\s+/g, "").replace(/[^0-9]/gi, "").substring(0, 16).match(/.{1,4}/g)?.join(" ") ?? "",
238
+ phone: (n) => {
239
+ const e = n.replace(/\D/g, "").substring(0, 10), t = e.match(/^(\d{3})(\d{3})(\d{4})$/);
240
+ return t ? `(${t[1]}) ${t[2]}-${t[3]}` : e;
241
+ },
242
+ expiry: (n) => {
243
+ const e = n.replace(/\//g, "");
244
+ return e.substring(0, 2) + (n.length > 2 ? "/" : "") + e.substring(2, 4);
245
+ },
246
+ cvv: (n) => n.replace(/\D/g, "").substring(0, 4),
247
+ zip: (n) => {
248
+ const e = n.replace(/\D/g, "").substring(0, 9);
249
+ return e.length > 5 ? `${e.substring(0, 5)}-${e.substring(5)}` : e;
250
+ }
251
+ };
252
+ function ce(n, e) {
253
+ return e === "none" ? n : le[e](n);
254
+ }
255
+ const $ = ({ label: n, maskType: e, id: t, name: o, type: s = "text", placeholder: m = "Enter value", tooltip: r = "", onChange: c }) => {
256
+ const d = ["card", "expiry", "phone", "cvv", "zip"].includes(e) ? "numeric" : "", i = p("label", {
257
+ className: "input-label",
258
+ innerHTML: n,
259
+ attributes: {
260
+ for: t
261
+ }
262
+ });
263
+ let l = !1;
264
+ const u = p("input", {
265
+ id: t || "input-id",
266
+ className: "styled-input",
267
+ attributes: {
268
+ placeholder: m,
269
+ type: s,
270
+ inputMode: d,
271
+ name: o
272
+ },
273
+ events: {
274
+ input: a,
275
+ blur: v,
276
+ keydown: (b) => {
277
+ b.key === "Enter" && (l = !0);
278
+ }
279
+ }
280
+ });
281
+ function a(b) {
282
+ const D = e !== "none" ? ce(b?.target?.value, e) : b?.target?.value;
283
+ u.value = D, c?.(D);
284
+ }
285
+ function v() {
286
+ l = !0, c?.(u?.value || "");
287
+ }
288
+ const y = p("div", {
289
+ className: "input-loader",
290
+ innerHTML: '<div class="loader"></div>',
291
+ dataset: { show: "false" }
292
+ }), w = r ? p("div", {
293
+ className: "input-right-element",
294
+ children: [
295
+ oe({ content: r, id: t })
296
+ ]
297
+ }) : null, g = p("div", {
298
+ className: "input-wrapper",
299
+ children: [
300
+ u,
301
+ y,
302
+ w
303
+ ]
304
+ }), N = p("div", {
305
+ className: "error-message",
306
+ dataset: { show: "false" },
307
+ innerHTML: `
308
+ ${k}
309
+ <span></span>
310
+ `
311
+ });
312
+ return {
313
+ element: p("div", {
314
+ className: "custom-input-group",
315
+ children: [
316
+ i,
317
+ g,
318
+ N
319
+ ]
320
+ }),
321
+ setLoading: (b) => {
322
+ x({ element: g }, {
323
+ dataset: { loading: b ? "true" : "false" }
324
+ }), x({ element: u }, {
325
+ attributes: { disabled: b ? "true" : "false" }
326
+ }), x({ element: y }, {
327
+ dataset: { show: b ? "true" : "false" }
328
+ });
329
+ },
330
+ setError: (b = "") => {
331
+ x({ element: g }, {
332
+ className: b && l ? { add: "input-error" } : { remove: "input-error" }
333
+ }), x({ element: N }, {
334
+ dataset: { show: b && l ? "true" : "false" },
335
+ innerHTML: `
336
+ ${k}
337
+ <span>${b || ""}</span>
338
+ `
339
+ });
340
+ }
341
+ };
342
+ }, de = async (n, e = {}) => {
343
+ const { method: t = "GET", headers: o = {}, body: s = null, ...m } = e;
344
+ try {
345
+ const r = {
346
+ method: t,
347
+ headers: {
348
+ Accept: "*/*",
349
+ "Content-Type": "application/json",
350
+ ...o
351
+ },
352
+ ...m
353
+ };
354
+ s && ["POST", "PUT", "PATCH", "DELETE"].includes(t.toUpperCase()) && (r.body = typeof s == "string" ? s : JSON.stringify(s));
355
+ const c = await fetch(n, r), d = c.headers.get("content-type");
356
+ let i;
357
+ if (d?.includes("application/json") ? i = await c.json() : i = await c.text(), !c.ok) {
358
+ const l = i;
359
+ throw new Error(
360
+ l?.message || `HTTP error! status: ${c.status}`
361
+ );
362
+ }
363
+ return { data: i, error: null };
364
+ } catch (r) {
365
+ return { data: null, error: r instanceof Error ? r.message : "An error occurred" };
366
+ }
367
+ }, ue = ({
368
+ title: n = "",
369
+ children: e,
370
+ onClose: t,
371
+ showBackBtn: o = !1,
372
+ showCloseBtn: s = !0
373
+ }) => {
374
+ const m = p("button", {
375
+ className: "back-btn",
376
+ innerHTML: re,
377
+ dataset: { show: String(o) },
378
+ events: { click: () => h() }
379
+ }), r = p("h3", {
380
+ textContent: n
381
+ }), c = p("button", {
382
+ className: "close-btn",
383
+ innerHTML: "&times;",
384
+ dataset: { show: String(s) },
385
+ attributes: { "aria-label": "Close modal" },
386
+ events: { click: () => h() }
387
+ }), d = p("div", {
388
+ className: "modal-header",
389
+ children: [m, r, c]
390
+ }), i = p("div", {
391
+ className: "modal-content",
392
+ children: [e]
393
+ }), l = p("dialog", {
394
+ className: "custom-modal",
395
+ children: [d, i],
396
+ events: {
397
+ cancel: (a) => {
398
+ a.preventDefault(), h();
399
+ }
400
+ }
401
+ }), h = () => {
402
+ l.close(), t?.();
403
+ };
404
+ return {
405
+ element: l,
406
+ setModalVisibility: (a) => {
407
+ a ? l.showModal() : l.close();
408
+ }
409
+ };
410
+ }, pe = ({ token: n, endpoint: e, beneficiaryCard: t = !1, isModal: o = !1, onCallback: s = () => null }) => {
411
+ const m = t ? "Enter Recipient Debit Card Details" : "Enter Your Debit Card Details", r = t ? "Enter the debit card details of the recipient you're sending funds to." : "Linking an external account allows you to send and receive money to your account.", c = t ? "Debit Card Number" : "Your Debit Card Number", d = t ? "Enter recipient's card number" : "Enter your card number", i = `add-card-form-wrapper${t ? " recipient-form" : ""}`, l = {
412
+ cardNumber: "",
413
+ expiryDate: "",
414
+ cvv: "",
415
+ zipCode: ""
416
+ }, { element: h, setError: u } = $({
417
+ label: c,
418
+ placeholder: d,
419
+ id: "card-number-input",
420
+ name: "cardNumber",
421
+ maskType: "card",
422
+ onChange(f) {
423
+ L("cardNumber", f, u);
424
+ }
425
+ }), { element: a, setError: v } = $({
426
+ label: "Expiration Date",
427
+ placeholder: "MM/YY",
428
+ id: "expiry-input",
429
+ name: "expiryDate",
430
+ maskType: "expiry",
431
+ onChange(f) {
432
+ L("expiryDate", f, v);
433
+ }
434
+ }), { element: y, setError: w } = $({
435
+ label: "CVV",
436
+ placeholder: "3-Digit",
437
+ type: "number",
438
+ maskType: "cvv",
439
+ id: "cvv-input",
440
+ name: "cvv",
441
+ tooltip: "A CVV is a 3-digit number on your debit card. You can find it on the back side of the card.",
442
+ onChange(f) {
443
+ L("cvv", f, w);
444
+ }
445
+ }), { element: g, setError: N } = $({
446
+ label: "ZIP Code",
447
+ placeholder: t ? "ZIP Code" : "Enter your ZIP Code",
448
+ id: "zip-input",
449
+ name: "zipCode",
450
+ maskType: "zip",
451
+ onChange(f) {
452
+ L("zipCode", f, N);
453
+ }
454
+ }), M = p("div", {
455
+ className: t ? "input-sections" : "inputs",
456
+ children: [h, a, y, g]
457
+ }), A = p("p", {
458
+ className: "submit-error",
459
+ dataset: { show: "false" }
460
+ // innerHTML: `//icon`
461
+ }), { element: j, setDisabled: b, setLoading: D } = se({
462
+ children: "Link Card",
463
+ type: "submit",
464
+ disabled: !0
465
+ }), z = (f = "") => {
466
+ x({ element: A }, {
467
+ dataset: { show: String(!!f) },
468
+ innerHTML: `
469
+ ${k}
470
+ ${f || ""}
471
+ `
472
+ });
473
+ }, B = (f = !0) => {
474
+ b(f), D(f);
475
+ };
476
+ function L(f, H, E) {
477
+ l[f] = H;
478
+ const { isValid: I, errors: T } = ae(l);
479
+ T[f] ? E(T[f]) : E(""), b(!I);
480
+ }
481
+ const O = p("div", {
482
+ className: "submit-button-wrapper",
483
+ children: [A, j]
484
+ });
485
+ async function P(f) {
486
+ f.preventDefault();
487
+ const H = new FormData(f.target), E = Object.fromEntries(H.entries());
488
+ console.log(E);
489
+ const I = E?.cardNumber, T = E?.expiryDate, _ = E?.cvv, G = E?.zipCode, K = Number(T?.split("/")[0]), U = ie(T?.split("/")[1]), J = V(I);
490
+ B(!0), z("");
491
+ const C = await de(e, {
492
+ method: "POST",
493
+ body: {
494
+ token: n,
495
+ pan: J,
496
+ expiry_month: K,
497
+ expiry_year: U,
498
+ cvv: V(_),
499
+ address: {
500
+ postal_code: V(G)
501
+ }
502
+ }
503
+ });
504
+ C.error ? (console.error("Request failed:", C.error), B(!1), z(C.error), s?.({ success: !1, error: C.error })) : (console.log("Request success:", C.data), B(!1), s?.({ success: !0, data: C.data }));
505
+ }
506
+ const Z = () => p("form", {
507
+ events: {
508
+ submit: P
509
+ },
510
+ children: [
511
+ M,
512
+ O
513
+ ]
514
+ }), W = () => p("div", {
515
+ className: "form-title",
516
+ innerHTML: `
517
+ <p>${r}</p>
518
+
519
+ <div>
520
+ ${te}
521
+
522
+ <span>Secured with 256-bit encryption</span>
523
+ </div>
524
+ `
525
+ }), Y = () => p("div", {
526
+ className: o ? "" : "non-modal-content",
527
+ children: [W(), Z()]
528
+ }), R = o ? null : p("div", {
529
+ className: `${i} non-modal`,
530
+ children: [
531
+ p("div", {
532
+ className: "non-modal-header",
533
+ innerHTML: `
534
+ <span></span>
535
+ <h3>${m}</h3>
536
+ <span></span>
537
+ `
538
+ }),
539
+ Y()
540
+ ]
541
+ }), { element: F, setModalVisibility: S } = o ? ue({ title: m, children: Y() }) : { element: null, setModalVisibility: () => {
542
+ } };
543
+ function q() {
544
+ F && (document.body.appendChild(
545
+ p("div", {
546
+ className: i,
547
+ children: [F]
548
+ })
549
+ ), S(!0));
550
+ }
551
+ return {
552
+ renderFormWithModal: q,
553
+ nonModalForm: R,
554
+ closeModal: () => S(!1)
555
+ };
556
+ };
557
+ function me({ token: n, endpoint: e, beneficiaryCard: t, isModal: o, onCallback: s }) {
558
+ const { renderFormWithModal: m, nonModalForm: r, closeModal: c } = pe({
559
+ token: n,
560
+ endpoint: e,
561
+ beneficiaryCard: t,
562
+ isModal: o,
563
+ onCallback: s
564
+ });
565
+ return {
566
+ mount(d) {
567
+ const i = "className" in d ? document.querySelector(d.className) : "id" in d ? document.getElementById(d.id) : d.element;
568
+ i && r && i.appendChild(r);
569
+ },
570
+ open() {
571
+ m();
572
+ },
573
+ destroy() {
574
+ c();
575
+ }
576
+ };
577
+ }
578
+ function ve({
579
+ token: n,
580
+ endpoint: e,
581
+ isModal: t = !1,
582
+ beneficiaryCard: o = !1,
583
+ isOpen: s = !1,
584
+ onCallback: m = () => null
585
+ }) {
586
+ const r = X(null);
587
+ return ee(() => {
588
+ let c = me({
589
+ token: n,
590
+ endpoint: e,
591
+ beneficiaryCard: o,
592
+ isModal: t,
593
+ onCallback: m
594
+ });
595
+ if (t)
596
+ s ? c.open() : c.destroy();
597
+ else {
598
+ if (!r?.current) return;
599
+ c.mount({ element: r.current });
600
+ }
601
+ return () => {
602
+ c.destroy();
603
+ };
604
+ }, [t, n, e, o, s]), t ? null : /* @__PURE__ */ Q("div", { ref: r });
605
+ }
606
+ export {
607
+ ve as AddCard
608
+ };
@@ -0,0 +1 @@
1
+ .custom-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:16px;font-family:var(--bivo-payments-font-family, inherit);font-weight:600;border-radius:3px;outline:none;cursor:pointer;transition:all .2s;border:1px solid transparent;box-sizing:border-box;white-space:nowrap;width:100%}.custom-button .button-spinner{display:flex;align-items:center;animation:spin 1s linear infinite}.custom-button .button-spinner[data-show=false]{display:none}.custom-button .button-spinner svg{display:block}.custom-button .button-label{display:flex;align-items:center}.custom-button.small{height:36px;padding:0 16px;font-size:14px}.custom-button.medium{height:48px;padding:0 24px;font-size:16px}.custom-button.large{height:56px;padding:0 32px;font-size:18px}.custom-button.primary{background-color:var(--bivo-payments-primary, #000);color:var(--bivo-payments-primary-text, #fff);border-color:var(--bivo-payments-primary, #000)}.custom-button.primary:hover:not(.disabled){background-color:var(--bivo-payments-primary-hover, #333);border-color:var(--bivo-payments-primary-hover, #333)}.custom-button.primary:active:not(.disabled){background-color:var(--bivo-payments-primary-active, #1a1a1a);border-color:var(--bivo-payments-primary-active, #1a1a1a)}.custom-button.secondary{background-color:var(--bivo-payments-secondary, #f8f8fa);color:var(--bivo-payments-text, #000);border-color:var(--bivo-payments-border, #e3e5e9)}.custom-button.secondary:hover:not(.disabled){background-color:var(--bivo-payments-secondary-hover, #ececef);border-color:var(--bivo-payments-border-hover, #d1d3d9)}.custom-button.secondary:active:not(.disabled){background-color:var(--bivo-payments-secondary-active, #e3e5e9);border-color:var(--bivo-payments-border-active, #c1c3c9)}.custom-button.outline{background-color:transparent;color:var(--bivo-payments-text, #000);border-color:var(--bivo-payments-border, #e3e5e9)}.custom-button.outline:hover:not(.disabled){background-color:var(--bivo-payments-secondary, #f8f8fa);border-color:var(--bivo-payments-text, #000)}.custom-button.outline:active:not(.disabled){background-color:var(--bivo-payments-secondary-hover, #ececef);border-color:var(--bivo-payments-text, #000)}.custom-button.disabled,.custom-button:disabled{cursor:not-allowed;opacity:.5}.custom-button:focus-visible{outline:2px solid var(--bivo-payments-primary, #000);outline-offset:2px}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.tooltip-trigger{display:inline-flex;cursor:help}.tooltip-wrapper{display:flex;justify-content:center;align-items:center}.tooltip{position:fixed;z-index:9999;background-color:var(--bivo-payments-tooltip-bg, #1a1a1a);color:var(--bivo-payments-tooltip-text, #fff);border-radius:4px;padding:8px 12px;font-size:14px;line-height:1.4;box-shadow:0 2px 8px #00000026;pointer-events:none;animation:tooltipFadeIn .2s ease-in-out forwards;align-items:center}.tooltip .tooltip-content{position:relative;z-index:1}.tooltip .tooltip-arrow{position:absolute;width:0;height:0;border-style:solid}.tooltip.top .tooltip-arrow{bottom:-6px;left:50%;transform:translate(-50%);border-width:6px 6px 0 6px;border-color:var(--bivo-payments-tooltip-bg, #1a1a1a) transparent transparent transparent}.tooltip.bottom .tooltip-arrow{top:-6px;left:50%;transform:translate(-50%);border-width:0 6px 6px 6px;border-color:transparent transparent var(--bivo-payments-tooltip-bg, #1a1a1a) transparent}.tooltip.left .tooltip-arrow{right:-6px;top:50%;transform:translateY(-50%);border-width:6px 0 6px 6px;border-color:transparent transparent transparent var(--bivo-payments-tooltip-bg, #1a1a1a)}.tooltip.right .tooltip-arrow{left:-6px;top:50%;transform:translateY(-50%);border-width:6px 6px 6px 0;border-color:transparent var(--bivo-payments-tooltip-bg, #1a1a1a) transparent transparent}.tooltip[data-show=true]{display:flex}.tooltip[data-show=false]{display:none}@keyframes tooltipFadeIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.custom-input-group{display:flex;flex-direction:column;width:100%;align-items:flex-start}.custom-input-group .input-label{font-size:14px;font-weight:600;margin-bottom:6px;color:var(--bivo-payments-text, #000)}.custom-input-group .input-wrapper{width:100%;display:flex;align-items:center;position:relative;border:1px solid var(--bivo-payments-border, #e3e5e9);border-radius:3px;background-color:var(--bivo-payments-bg, #fff);height:44px;transition:border-color .2s;box-sizing:border-box}.custom-input-group .input-wrapper:focus-within{border-color:var(--bivo-payments-primary, #000)}.custom-input-group .input-wrapper.input-error{border-color:var(--bivo-payments-danger, #eb5757);background-color:var(--bivo-payments-secondary, #f8f8fa)}.custom-input-group .input-wrapper .styled-input{width:100%;padding:0 16px;border:none;background:transparent;font-size:16px;font-family:var(--bivo-payments-font-family, inherit);outline:none;height:100%;color:var(--bivo-payments-text, #000);box-sizing:border-box}.custom-input-group .input-wrapper .styled-input::placeholder{color:var(--bivo-payments-placeholder, rgba(60, 60, 67, .6));font-size:14px}.custom-input-group .input-wrapper .styled-input:disabled{cursor:not-allowed;opacity:.6}.custom-input-group .input-wrapper[data-loading=true] .styled-input{cursor:progress;opacity:.8;background:linear-gradient(90deg,#888 40%,var(--bivo-payments-primary, #000000) 50%,#888 60%);background-size:200% auto;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;animation:shimmer 1.5s linear infinite}.custom-input-group .input-wrapper[data-loading=true] .input-loader{display:flex;align-items:center;justify-content:center;padding:0 8px;flex-shrink:0}.custom-input-group .input-wrapper[data-loading=true] .input-loader .loader{width:24px;aspect-ratio:2;--_g: no-repeat radial-gradient( circle closest-side, var(--bivo-payments-placeholder, #3c3c4399) 90%, transparent );background:var(--_g) 0% 50%,var(--_g) 50% 50%,var(--_g) 100% 50%;background-size:33.3333333333% 50%;animation:l3 1s infinite linear}@keyframes l3{20%{background-position:0% 0%,50% 50%,100% 50%}40%{background-position:0% 100%,50% 0%,100% 50%}60%{background-position:0% 50%,50% 100%,100% 0%}80%{background-position:0% 50%,50% 50%,100% 100%}}.custom-input-group .input-wrapper[data-loading=true] .input-loader[data-show=false]{display:none}.custom-input-group .input-wrapper .input-right-element{display:flex;align-items:center;justify-content:center;padding-right:12px;flex-shrink:0;color:var(--bivo-payments-placeholder, rgba(60, 60, 67, .6))}.custom-input-group .input-wrapper .input-right-element button,.custom-input-group .input-wrapper .input-right-element a{cursor:pointer;background:none;border:none;padding:0;display:flex;align-items:center;justify-content:center}.custom-input-group .input-wrapper .input-right-element svg{display:block}.custom-input-group .error-message{padding:0;background-color:transparent;display:flex;align-items:center;gap:4px;color:var(--bivo-payments-danger, #eb5757);font-size:12px;margin-top:4px;font-weight:500}.custom-input-group .error-message[data-show=false]{display:none}@keyframes shimmer{0%{background-position:100% 0}to{background-position:-100% 0}}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield;appearance:textfield}.add-card-form-wrapper .custom-modal{max-width:500px}.add-card-form-wrapper.non-modal{max-width:500px;background-color:var(--bivo-payments-bg, #ffffff);color:var(--bivo-payments-text, #000);font-family:var(--bivo-payments-font-family, inherit)}.add-card-form-wrapper.non-modal .non-modal-content{padding:12px 20px}.add-card-form-wrapper.non-modal .non-modal-header{display:flex;justify-content:space-between;align-items:center;padding:10px 20px;border-bottom:1px solid var(--bivo-payments-border, #ccc);gap:8px;margin-bottom:0}.add-card-form-wrapper.non-modal .non-modal-header h3{margin:0;font-size:14px;color:var(--bivo-payments-text, #000)}.add-card-form-wrapper.non-modal .non-modal-header .close-btn,.add-card-form-wrapper.non-modal .non-modal-header .back-btn{background:none;border:none;font-size:1.5rem;cursor:pointer;color:var(--bivo-payments-text-secondary, #666);padding:0;line-height:1;height:32px;width:32px;display:grid;place-items:center;visibility:visible}.add-card-form-wrapper.non-modal .non-modal-header .close-btn:hover,.add-card-form-wrapper.non-modal .non-modal-header .back-btn:hover{color:var(--bivo-payments-text, #000)}.add-card-form-wrapper.non-modal .non-modal-header .close-btn[data-show=false],.add-card-form-wrapper.non-modal .non-modal-header .back-btn[data-show=false]{visibility:hidden}.add-card-form-wrapper div.form-title{display:flex;flex-direction:column;gap:20px}.add-card-form-wrapper div.form-title p{margin:0}.add-card-form-wrapper div.form-title>div{display:flex;align-items:center;gap:4px;font-size:12px}.add-card-form-wrapper form{margin-top:16px;margin-bottom:32px;display:flex;flex-direction:column;gap:40px}.add-card-form-wrapper form div.inputs{display:flex;flex-direction:column;gap:20px}.add-card-form-wrapper form div.inputs .input-wrapper .input-right-element .input-success-icon{color:var(--bivo-payments-success, green)}.add-card-form-wrapper form div.input-row{display:flex;align-items:flex-start;flex-direction:row;gap:16px;margin:0!important}.add-card-form-wrapper form .submit-button-wrapper{width:100%;display:flex;flex-direction:column;gap:8px;align-items:flex-start}.add-card-form-wrapper form .submit-button-wrapper p.submit-error{margin:0;font-size:14px;display:flex;gap:6px;align-items:center;color:var(--bivo-payments-danger, #eb5757)}.add-card-form-wrapper form .submit-button-wrapper p.submit-error[data-show=false]{display:hidden}.recipient-form form{margin-bottom:16px}.recipient-form form .input-sections{display:flex;flex-direction:column;gap:16px}.recipient-form form .input-sections p.section-title{font-size:16px;font-weight:500;margin:0}.recipient-form form .input-sections div.section{display:flex;flex-direction:column;gap:20px}.custom-modal{border:none;border-radius:8px;padding:0;min-width:500px;box-shadow:0 10px 25px #0003;background-color:var(--bivo-payments-bg, #ffffff);color:var(--bivo-payments-text, #000);font-family:var(--bivo-payments-font-family, inherit)}.custom-modal[open]{animation:fadeIn .3s ease-out}.custom-modal::backdrop{background-color:var(--bivo-payments-bg-overlay, rgba(0, 0, 0, .35));-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.custom-modal .modal-header{display:flex;justify-content:space-between;align-items:center;padding:10px 20px;border-bottom:1px solid var(--bivo-payments-border, #ccc);gap:8px;margin-bottom:0}.custom-modal .modal-header h3{margin:0;font-size:14px;color:var(--bivo-payments-text, #000)}.custom-modal .modal-header .close-btn,.custom-modal .modal-header .back-btn{background:none;border:none;font-size:1.5rem;cursor:pointer;color:var(--bivo-payments-text-secondary, #666);padding:0;line-height:1;height:32px;width:32px;display:grid;place-items:center;visibility:visible}.custom-modal .modal-header .close-btn:hover,.custom-modal .modal-header .back-btn:hover{color:var(--bivo-payments-text, #000)}.custom-modal .modal-header .close-btn[data-show=false],.custom-modal .modal-header .back-btn[data-show=false]{visibility:hidden}.custom-modal .modal-content{padding:12px 20px;color:var(--bivo-payments-text, #000)}.custom-modal .modal-actions{padding:16px 24px;background-color:var(--bivo-payments-bg-secondary, #f9f9f9);display:flex;justify-content:flex-end;gap:12px;border-top:1px solid var(--bivo-payments-secondary, #eee)}.custom-modal .modal-actions button{padding:8px 16px;border-radius:4px;border:none;cursor:pointer;font-weight:500;transition:background .2s}.custom-modal .modal-actions button.btn-secondary{background-color:var(--bivo-payments-secondary, #e0e0e0);color:var(--bivo-payments-secondary-text, #333)}.custom-modal .modal-actions button.btn-secondary:hover{background-color:var(--bivo-payments-secondary-hover, #d5d5d5)}.custom-modal .modal-actions button.btn-primary{background-color:var(--bivo-payments-info, #3b82f6);color:var(--bivo-payments-primary-text, white)}.custom-modal .modal-actions button.btn-primary:hover{background-color:var(--bivo-payments-info-hover, #2563eb)}@keyframes fadeIn{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translateY(0)}}
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ .custom-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:16px;font-family:var(--bivo-payments-font-family, inherit);font-weight:600;border-radius:3px;outline:none;cursor:pointer;transition:all .2s;border:1px solid transparent;box-sizing:border-box;white-space:nowrap;width:100%}.custom-button .button-spinner{display:flex;align-items:center;animation:spin 1s linear infinite}.custom-button .button-spinner[data-show=false]{display:none}.custom-button .button-spinner svg{display:block}.custom-button .button-label{display:flex;align-items:center}.custom-button.small{height:36px;padding:0 16px;font-size:14px}.custom-button.medium{height:48px;padding:0 24px;font-size:16px}.custom-button.large{height:56px;padding:0 32px;font-size:18px}.custom-button.primary{background-color:var(--bivo-payments-primary, #000);color:var(--bivo-payments-primary-text, #fff);border-color:var(--bivo-payments-primary, #000)}.custom-button.primary:hover:not(.disabled){background-color:var(--bivo-payments-primary-hover, #333);border-color:var(--bivo-payments-primary-hover, #333)}.custom-button.primary:active:not(.disabled){background-color:var(--bivo-payments-primary-active, #1a1a1a);border-color:var(--bivo-payments-primary-active, #1a1a1a)}.custom-button.secondary{background-color:var(--bivo-payments-secondary, #f8f8fa);color:var(--bivo-payments-text, #000);border-color:var(--bivo-payments-border, #e3e5e9)}.custom-button.secondary:hover:not(.disabled){background-color:var(--bivo-payments-secondary-hover, #ececef);border-color:var(--bivo-payments-border-hover, #d1d3d9)}.custom-button.secondary:active:not(.disabled){background-color:var(--bivo-payments-secondary-active, #e3e5e9);border-color:var(--bivo-payments-border-active, #c1c3c9)}.custom-button.outline{background-color:transparent;color:var(--bivo-payments-text, #000);border-color:var(--bivo-payments-border, #e3e5e9)}.custom-button.outline:hover:not(.disabled){background-color:var(--bivo-payments-secondary, #f8f8fa);border-color:var(--bivo-payments-text, #000)}.custom-button.outline:active:not(.disabled){background-color:var(--bivo-payments-secondary-hover, #ececef);border-color:var(--bivo-payments-text, #000)}.custom-button.disabled,.custom-button:disabled{cursor:not-allowed;opacity:.5}.custom-button:focus-visible{outline:2px solid var(--bivo-payments-primary, #000);outline-offset:2px}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.tooltip-trigger{display:inline-flex;cursor:help}.tooltip-wrapper{display:flex;justify-content:center;align-items:center}.tooltip{position:fixed;z-index:9999;background-color:var(--bivo-payments-tooltip-bg, #1a1a1a);color:var(--bivo-payments-tooltip-text, #fff);border-radius:4px;padding:8px 12px;font-size:14px;line-height:1.4;box-shadow:0 2px 8px #00000026;pointer-events:none;animation:tooltipFadeIn .2s ease-in-out forwards;align-items:center}.tooltip .tooltip-content{position:relative;z-index:1}.tooltip .tooltip-arrow{position:absolute;width:0;height:0;border-style:solid}.tooltip.top .tooltip-arrow{bottom:-6px;left:50%;transform:translate(-50%);border-width:6px 6px 0 6px;border-color:var(--bivo-payments-tooltip-bg, #1a1a1a) transparent transparent transparent}.tooltip.bottom .tooltip-arrow{top:-6px;left:50%;transform:translate(-50%);border-width:0 6px 6px 6px;border-color:transparent transparent var(--bivo-payments-tooltip-bg, #1a1a1a) transparent}.tooltip.left .tooltip-arrow{right:-6px;top:50%;transform:translateY(-50%);border-width:6px 0 6px 6px;border-color:transparent transparent transparent var(--bivo-payments-tooltip-bg, #1a1a1a)}.tooltip.right .tooltip-arrow{left:-6px;top:50%;transform:translateY(-50%);border-width:6px 6px 6px 0;border-color:transparent var(--bivo-payments-tooltip-bg, #1a1a1a) transparent transparent}.tooltip[data-show=true]{display:flex}.tooltip[data-show=false]{display:none}@keyframes tooltipFadeIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.custom-input-group{display:flex;flex-direction:column;width:100%;align-items:flex-start}.custom-input-group .input-label{font-size:14px;font-weight:600;margin-bottom:6px;color:var(--bivo-payments-text, #000)}.custom-input-group .input-wrapper{width:100%;display:flex;align-items:center;position:relative;border:1px solid var(--bivo-payments-border, #e3e5e9);border-radius:3px;background-color:var(--bivo-payments-bg, #fff);height:44px;transition:border-color .2s;box-sizing:border-box}.custom-input-group .input-wrapper:focus-within{border-color:var(--bivo-payments-primary, #000)}.custom-input-group .input-wrapper.input-error{border-color:var(--bivo-payments-danger, #eb5757);background-color:var(--bivo-payments-secondary, #f8f8fa)}.custom-input-group .input-wrapper .styled-input{width:100%;padding:0 16px;border:none;background:transparent;font-size:16px;font-family:var(--bivo-payments-font-family, inherit);outline:none;height:100%;color:var(--bivo-payments-text, #000);box-sizing:border-box}.custom-input-group .input-wrapper .styled-input::placeholder{color:var(--bivo-payments-placeholder, rgba(60, 60, 67, .6));font-size:14px}.custom-input-group .input-wrapper .styled-input:disabled{cursor:not-allowed;opacity:.6}.custom-input-group .input-wrapper[data-loading=true] .styled-input{cursor:progress;opacity:.8;background:linear-gradient(90deg,#888 40%,var(--bivo-payments-primary, #000000) 50%,#888 60%);background-size:200% auto;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;animation:shimmer 1.5s linear infinite}.custom-input-group .input-wrapper[data-loading=true] .input-loader{display:flex;align-items:center;justify-content:center;padding:0 8px;flex-shrink:0}.custom-input-group .input-wrapper[data-loading=true] .input-loader .loader{width:24px;aspect-ratio:2;--_g: no-repeat radial-gradient( circle closest-side, var(--bivo-payments-placeholder, #3c3c4399) 90%, transparent );background:var(--_g) 0% 50%,var(--_g) 50% 50%,var(--_g) 100% 50%;background-size:33.3333333333% 50%;animation:l3 1s infinite linear}@keyframes l3{20%{background-position:0% 0%,50% 50%,100% 50%}40%{background-position:0% 100%,50% 0%,100% 50%}60%{background-position:0% 50%,50% 100%,100% 0%}80%{background-position:0% 50%,50% 50%,100% 100%}}.custom-input-group .input-wrapper[data-loading=true] .input-loader[data-show=false]{display:none}.custom-input-group .input-wrapper .input-right-element{display:flex;align-items:center;justify-content:center;padding-right:12px;flex-shrink:0;color:var(--bivo-payments-placeholder, rgba(60, 60, 67, .6))}.custom-input-group .input-wrapper .input-right-element button,.custom-input-group .input-wrapper .input-right-element a{cursor:pointer;background:none;border:none;padding:0;display:flex;align-items:center;justify-content:center}.custom-input-group .input-wrapper .input-right-element svg{display:block}.custom-input-group .error-message{padding:0;background-color:transparent;display:flex;align-items:center;gap:4px;color:var(--bivo-payments-danger, #eb5757);font-size:12px;margin-top:4px;font-weight:500}.custom-input-group .error-message[data-show=false]{display:none}@keyframes shimmer{0%{background-position:100% 0}to{background-position:-100% 0}}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield;appearance:textfield}.add-card-form-wrapper .custom-modal{max-width:500px}.add-card-form-wrapper.non-modal{max-width:500px;background-color:var(--bivo-payments-bg, #ffffff);color:var(--bivo-payments-text, #000);font-family:var(--bivo-payments-font-family, inherit)}.add-card-form-wrapper.non-modal .non-modal-content{padding:12px 20px}.add-card-form-wrapper.non-modal .non-modal-header{display:flex;justify-content:space-between;align-items:center;padding:10px 20px;border-bottom:1px solid var(--bivo-payments-border, #ccc);gap:8px;margin-bottom:0}.add-card-form-wrapper.non-modal .non-modal-header h3{margin:0;font-size:14px;color:var(--bivo-payments-text, #000)}.add-card-form-wrapper.non-modal .non-modal-header .close-btn,.add-card-form-wrapper.non-modal .non-modal-header .back-btn{background:none;border:none;font-size:1.5rem;cursor:pointer;color:var(--bivo-payments-text-secondary, #666);padding:0;line-height:1;height:32px;width:32px;display:grid;place-items:center;visibility:visible}.add-card-form-wrapper.non-modal .non-modal-header .close-btn:hover,.add-card-form-wrapper.non-modal .non-modal-header .back-btn:hover{color:var(--bivo-payments-text, #000)}.add-card-form-wrapper.non-modal .non-modal-header .close-btn[data-show=false],.add-card-form-wrapper.non-modal .non-modal-header .back-btn[data-show=false]{visibility:hidden}.add-card-form-wrapper div.form-title{display:flex;flex-direction:column;gap:20px}.add-card-form-wrapper div.form-title p{margin:0}.add-card-form-wrapper div.form-title>div{display:flex;align-items:center;gap:4px;font-size:12px}.add-card-form-wrapper form{margin-top:16px;margin-bottom:32px;display:flex;flex-direction:column;gap:40px}.add-card-form-wrapper form div.inputs{display:flex;flex-direction:column;gap:20px}.add-card-form-wrapper form div.inputs .input-wrapper .input-right-element .input-success-icon{color:var(--bivo-payments-success, green)}.add-card-form-wrapper form div.input-row{display:flex;align-items:flex-start;flex-direction:row;gap:16px;margin:0!important}.add-card-form-wrapper form .submit-button-wrapper{width:100%;display:flex;flex-direction:column;gap:8px;align-items:flex-start}.add-card-form-wrapper form .submit-button-wrapper p.submit-error{margin:0;font-size:14px;display:flex;gap:6px;align-items:center;color:var(--bivo-payments-danger, #eb5757)}.add-card-form-wrapper form .submit-button-wrapper p.submit-error[data-show=false]{display:hidden}.recipient-form form{margin-bottom:16px}.recipient-form form .input-sections{display:flex;flex-direction:column;gap:16px}.recipient-form form .input-sections p.section-title{font-size:16px;font-weight:500;margin:0}.recipient-form form .input-sections div.section{display:flex;flex-direction:column;gap:20px}.custom-modal{border:none;border-radius:8px;padding:0;min-width:500px;box-shadow:0 10px 25px #0003;background-color:var(--bivo-payments-bg, #ffffff);color:var(--bivo-payments-text, #000);font-family:var(--bivo-payments-font-family, inherit)}.custom-modal[open]{animation:fadeIn .3s ease-out}.custom-modal::backdrop{background-color:var(--bivo-payments-bg-overlay, rgba(0, 0, 0, .35));-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.custom-modal .modal-header{display:flex;justify-content:space-between;align-items:center;padding:10px 20px;border-bottom:1px solid var(--bivo-payments-border, #ccc);gap:8px;margin-bottom:0}.custom-modal .modal-header h3{margin:0;font-size:14px;color:var(--bivo-payments-text, #000)}.custom-modal .modal-header .close-btn,.custom-modal .modal-header .back-btn{background:none;border:none;font-size:1.5rem;cursor:pointer;color:var(--bivo-payments-text-secondary, #666);padding:0;line-height:1;height:32px;width:32px;display:grid;place-items:center;visibility:visible}.custom-modal .modal-header .close-btn:hover,.custom-modal .modal-header .back-btn:hover{color:var(--bivo-payments-text, #000)}.custom-modal .modal-header .close-btn[data-show=false],.custom-modal .modal-header .back-btn[data-show=false]{visibility:hidden}.custom-modal .modal-content{padding:12px 20px;color:var(--bivo-payments-text, #000)}.custom-modal .modal-actions{padding:16px 24px;background-color:var(--bivo-payments-bg-secondary, #f9f9f9);display:flex;justify-content:flex-end;gap:12px;border-top:1px solid var(--bivo-payments-secondary, #eee)}.custom-modal .modal-actions button{padding:8px 16px;border-radius:4px;border:none;cursor:pointer;font-weight:500;transition:background .2s}.custom-modal .modal-actions button.btn-secondary{background-color:var(--bivo-payments-secondary, #e0e0e0);color:var(--bivo-payments-secondary-text, #333)}.custom-modal .modal-actions button.btn-secondary:hover{background-color:var(--bivo-payments-secondary-hover, #d5d5d5)}.custom-modal .modal-actions button.btn-primary{background-color:var(--bivo-payments-info, #3b82f6);color:var(--bivo-payments-primary-text, white)}.custom-modal .modal-actions button.btn-primary:hover{background-color:var(--bivo-payments-info-hover, #2563eb)}@keyframes fadeIn{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translateY(0)}}
package/dist/vite.svg ADDED
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>