@odus/checkout 0.12.0 → 0.13.0
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/checkout.es.js +89 -75
- package/dist/index.css +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/checkout.es.js
CHANGED
|
@@ -152,13 +152,13 @@ class K {
|
|
|
152
152
|
return this.events.get(e)?.size || 0;
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
const
|
|
156
|
-
class
|
|
155
|
+
const q = new K();
|
|
156
|
+
class j {
|
|
157
157
|
state;
|
|
158
158
|
initialState;
|
|
159
159
|
eventBus;
|
|
160
160
|
stateChangedEvent = "state-changed";
|
|
161
|
-
constructor(e, t =
|
|
161
|
+
constructor(e, t = q) {
|
|
162
162
|
this.initialState = { ...e }, this.state = { ...e }, this.eventBus = t;
|
|
163
163
|
}
|
|
164
164
|
/**
|
|
@@ -199,7 +199,7 @@ class q {
|
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
function T(o) {
|
|
202
|
-
return new
|
|
202
|
+
return new j(o);
|
|
203
203
|
}
|
|
204
204
|
function U({
|
|
205
205
|
apiKey: o,
|
|
@@ -468,7 +468,7 @@ const V = {
|
|
|
468
468
|
const h = e.getState();
|
|
469
469
|
let d = c;
|
|
470
470
|
l in V && (d = V[l](c));
|
|
471
|
-
const
|
|
471
|
+
const p = {
|
|
472
472
|
...h.formData,
|
|
473
473
|
[l]: d
|
|
474
474
|
}, g = { ...h.errors };
|
|
@@ -477,16 +477,16 @@ const V = {
|
|
|
477
477
|
F ? g[l] = F : delete g[l];
|
|
478
478
|
}
|
|
479
479
|
e.setState({
|
|
480
|
-
formData:
|
|
480
|
+
formData: p,
|
|
481
481
|
errors: g,
|
|
482
|
-
isValid: a(
|
|
482
|
+
isValid: a(p)
|
|
483
483
|
});
|
|
484
484
|
}, s = (l, c) => {
|
|
485
485
|
const h = e.getState(), d = {
|
|
486
486
|
...h.touched,
|
|
487
487
|
[l]: !0
|
|
488
|
-
},
|
|
489
|
-
|
|
488
|
+
}, p = t(l, c), g = { ...h.errors };
|
|
489
|
+
p ? g[l] = p : delete g[l], e.setState({
|
|
490
490
|
touched: d,
|
|
491
491
|
errors: g
|
|
492
492
|
});
|
|
@@ -545,25 +545,25 @@ function Q({
|
|
|
545
545
|
let n = null;
|
|
546
546
|
const l = async () => {
|
|
547
547
|
try {
|
|
548
|
-
const
|
|
548
|
+
const f = await X({
|
|
549
549
|
props: {
|
|
550
550
|
payment: r
|
|
551
551
|
},
|
|
552
552
|
apiKey: o,
|
|
553
553
|
environment: a
|
|
554
554
|
});
|
|
555
|
-
|
|
555
|
+
f && (s.setState({
|
|
556
556
|
iframeConfig: {
|
|
557
|
-
...
|
|
557
|
+
...f,
|
|
558
558
|
origin: globalThis.location.origin
|
|
559
559
|
}
|
|
560
560
|
}), h());
|
|
561
|
-
} catch (
|
|
562
|
-
throw console.error("Failed to generate iframe config:",
|
|
561
|
+
} catch (f) {
|
|
562
|
+
throw console.error("Failed to generate iframe config:", f), f;
|
|
563
563
|
}
|
|
564
564
|
}, c = () => {
|
|
565
|
-
const
|
|
566
|
-
if (!
|
|
565
|
+
const f = s.getState();
|
|
566
|
+
if (!f.iframeConfig || !e) {
|
|
567
567
|
console.error(
|
|
568
568
|
"[IframeConfig] Missing iframe config or checkout profile."
|
|
569
569
|
);
|
|
@@ -573,12 +573,12 @@ function Q({
|
|
|
573
573
|
if (!b || !k)
|
|
574
574
|
throw new Error("Card elements not found in DOM");
|
|
575
575
|
n = new globalThis.TokenEx.Iframe("card-element", {
|
|
576
|
-
...
|
|
576
|
+
...f.iframeConfig,
|
|
577
577
|
placeholder: "1234 1234 1234 1234",
|
|
578
578
|
cvvPlaceholder: "CVC",
|
|
579
579
|
cvv: !0,
|
|
580
580
|
cvvContainerID: "card-cvv-element",
|
|
581
|
-
enableValidateOnBlur: !
|
|
581
|
+
enableValidateOnBlur: !0,
|
|
582
582
|
enableValidateOnKeyUp: !0,
|
|
583
583
|
enableValidateOnCvvKeyUp: !0,
|
|
584
584
|
enablePrettyFormat: !0,
|
|
@@ -642,32 +642,32 @@ function Q({
|
|
|
642
642
|
}
|
|
643
643
|
}, d = async () => {
|
|
644
644
|
o && await l();
|
|
645
|
-
},
|
|
645
|
+
}, p = () => {
|
|
646
646
|
n && (n.remove(), n = null);
|
|
647
|
-
}, g = async (
|
|
647
|
+
}, g = async (f) => {
|
|
648
648
|
n && (n.on("tokenize", async function(b) {
|
|
649
|
-
await
|
|
649
|
+
await f(b);
|
|
650
650
|
}), n.tokenize());
|
|
651
651
|
}, F = () => {
|
|
652
652
|
if (n)
|
|
653
653
|
try {
|
|
654
654
|
n.focus();
|
|
655
|
-
} catch (
|
|
656
|
-
console.error("Failed to focus card number iframe:",
|
|
655
|
+
} catch (f) {
|
|
656
|
+
console.error("Failed to focus card number iframe:", f);
|
|
657
657
|
}
|
|
658
658
|
}, I = () => {
|
|
659
659
|
if (n)
|
|
660
660
|
try {
|
|
661
661
|
n.cvvFocus();
|
|
662
|
-
} catch (
|
|
663
|
-
console.error("Failed to focus CVV iframe:",
|
|
662
|
+
} catch (f) {
|
|
663
|
+
console.error("Failed to focus CVV iframe:", f);
|
|
664
664
|
}
|
|
665
665
|
};
|
|
666
666
|
return {
|
|
667
667
|
getState: s.getState.bind(s),
|
|
668
668
|
subscribe: s.subscribe.bind(s),
|
|
669
669
|
tokenize: g,
|
|
670
|
-
cleanup:
|
|
670
|
+
cleanup: p,
|
|
671
671
|
initialize: d,
|
|
672
672
|
focusCardNumber: F,
|
|
673
673
|
focusCvv: I
|
|
@@ -713,7 +713,7 @@ const ee = "E-Mail", te = "Name des/der Karteninhaber/in", ie = "Kartendaten", a
|
|
|
713
713
|
"pay-with-card": "ou payez avec une carte",
|
|
714
714
|
buttonTexts: ze,
|
|
715
715
|
validation: Ve
|
|
716
|
-
}, Ae = "Email", $e = "Nome del titolare della carta", Re = "Informazioni sulla carta", Be = "Nome completo sulla carta", He = "MM / AA", Oe = "Non chiudere la finestra", Ke = { pay: "PAGA", submit: "INVIA", getPlan: "OTTIENI IL MIO PIANO", donate: "DONARE", book: "PRENOTA ORA", order: "ORDINA ORA" },
|
|
716
|
+
}, Ae = "Email", $e = "Nome del titolare della carta", Re = "Informazioni sulla carta", Be = "Nome completo sulla carta", He = "MM / AA", Oe = "Non chiudere la finestra", Ke = { pay: "PAGA", submit: "INVIA", getPlan: "OTTIENI IL MIO PIANO", donate: "DONARE", book: "PRENOTA ORA", order: "ORDINA ORA" }, qe = { emailSuggestion: "Intendevi {{email}}?", emailInvalid: "La tua email non è corretta", cardExpiryInvalid: "La data di scadenza della tua carta è nel passato", cardExpiryFormat: "La data di scadenza della tua carta è incompleta", cardSecurityFormat: "Il codice di sicurezza della tua carta è incompleto", nameRequired: "Inserisci il nome come appare sulla tua carta", cardNumberInvalid: "Il numero della tua carta non è valido", "invalid-checkout": "Impossibile inizializzare il checkout" }, je = {
|
|
717
717
|
email: Ae,
|
|
718
718
|
cardholderNameLabel: $e,
|
|
719
719
|
cardInformation: Re,
|
|
@@ -722,7 +722,7 @@ const ee = "E-Mail", te = "Name des/der Karteninhaber/in", ie = "Kartendaten", a
|
|
|
722
722
|
loading: Oe,
|
|
723
723
|
"pay-with-card": "o paga con carta",
|
|
724
724
|
buttonTexts: Ke,
|
|
725
|
-
validation:
|
|
725
|
+
validation: qe
|
|
726
726
|
}, Ue = "Adres e-mail", _e = "Imię i nazwisko posiadacza karty", Ge = "Informacje o karcie", Ye = "Imię i nazwisko na karcie", Ze = "MM / RR", Je = "Proszę nie zamykać tego okna", We = { pay: "ZAPŁAĆ", submit: "WYŚLIJ", getPlan: "POBIERZ MÓJ PLAN", donate: "PRZEKAŻ DAROWIZNĘ", book: "ZAREZERWUJ TERAZ", order: "ZAMÓW TERAZ" }, Xe = { emailSuggestion: "Czy chodziło Ci o {{email}}?", emailInvalid: "Państwa adres e-mail jest nieprawidłowy", cardExpiryInvalid: "Data ważności Państwa karty jest w przeszłości", cardExpiryFormat: "Data ważności Państwa karty jest niekompletna", cardSecurityFormat: "Kod zabezpieczający Państwa karty jest niekompletny", nameRequired: "Proszę wpisać imię i nazwisko tak, jak widnieje na karcie", cardNumberInvalid: "Numer Państwa karty jest nieprawidłowy", "invalid-checkout": "Nie udało się zainicjować procesu płatności" }, Qe = {
|
|
727
727
|
email: Ue,
|
|
728
728
|
cardholderNameLabel: _e,
|
|
@@ -761,7 +761,7 @@ const ee = "E-Mail", te = "Name des/der Karteninhaber/in", ie = "Kartendaten", a
|
|
|
761
761
|
pl: Qe,
|
|
762
762
|
pt: lt,
|
|
763
763
|
tr: yt,
|
|
764
|
-
it:
|
|
764
|
+
it: je
|
|
765
765
|
// Add other locales here
|
|
766
766
|
};
|
|
767
767
|
class vt {
|
|
@@ -999,6 +999,23 @@ class Ft {
|
|
|
999
999
|
focusCardNumberField() {
|
|
1000
1000
|
this.currentFocusIndex = 0, this.applyFocusToCurrentField();
|
|
1001
1001
|
}
|
|
1002
|
+
/**
|
|
1003
|
+
* Focus a specific field by name
|
|
1004
|
+
* Used for manual focus control (e.g., Tab key navigation)
|
|
1005
|
+
*/
|
|
1006
|
+
focusField(e) {
|
|
1007
|
+
const t = this.focusSequence.findIndex(
|
|
1008
|
+
(i) => i === e
|
|
1009
|
+
);
|
|
1010
|
+
if (t >= 0)
|
|
1011
|
+
this.currentFocusIndex = t, this.applyFocusToCurrentField();
|
|
1012
|
+
else if (this.fields[e]) {
|
|
1013
|
+
const i = this.fields[e];
|
|
1014
|
+
i && setTimeout(() => {
|
|
1015
|
+
i.focus();
|
|
1016
|
+
}, 0);
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1002
1019
|
}
|
|
1003
1020
|
const L = (o) => Object.entries(o).map(([e, t]) => {
|
|
1004
1021
|
const i = e.replace(/([A-Z])/g, "-$1").toLowerCase(), a = typeof t == "number" ? `${t}px` : t;
|
|
@@ -1307,12 +1324,6 @@ class Mt extends m {
|
|
|
1307
1324
|
const r = u.createDiv(["skeleton-field"]), s = u.createDiv(["skeleton", "skeleton-label"]), n = u.createDiv(["skeleton", "skeleton-input"]);
|
|
1308
1325
|
return r.appendChild(s), r.appendChild(n), e.appendChild(t), e.appendChild(r), e;
|
|
1309
1326
|
}
|
|
1310
|
-
createSubmitButtonSkeleton() {
|
|
1311
|
-
return u.createDiv([
|
|
1312
|
-
"skeleton",
|
|
1313
|
-
"skeleton-submit-button"
|
|
1314
|
-
]);
|
|
1315
|
-
}
|
|
1316
1327
|
}
|
|
1317
1328
|
class Lt extends m {
|
|
1318
1329
|
titleElement;
|
|
@@ -1575,11 +1586,11 @@ class $t extends m {
|
|
|
1575
1586
|
isCvvTouched: c,
|
|
1576
1587
|
cardType: h,
|
|
1577
1588
|
cardExpiry: d,
|
|
1578
|
-
cardExpiryError:
|
|
1589
|
+
cardExpiryError: p,
|
|
1579
1590
|
cardExpiryTouched: g,
|
|
1580
1591
|
onChange: F,
|
|
1581
1592
|
onBlur: I,
|
|
1582
|
-
translationFunc:
|
|
1593
|
+
translationFunc: f,
|
|
1583
1594
|
cardExpiryAutocomplete: b = "cc-exp"
|
|
1584
1595
|
} = e, k = document.createElement("div");
|
|
1585
1596
|
this.cardNumber = new At({
|
|
@@ -1588,7 +1599,7 @@ class $t extends m {
|
|
|
1588
1599
|
fontSize: t.styles.fontSize,
|
|
1589
1600
|
borderRadius: t.styles.borderRadius
|
|
1590
1601
|
},
|
|
1591
|
-
label:
|
|
1602
|
+
label: f("cardInformation"),
|
|
1592
1603
|
isLoading: i,
|
|
1593
1604
|
isFocused: a,
|
|
1594
1605
|
cardType: h
|
|
@@ -1597,10 +1608,10 @@ class $t extends m {
|
|
|
1597
1608
|
v.className = "card-details", this.cardExpiry = new z({
|
|
1598
1609
|
name: "cardExpiry",
|
|
1599
1610
|
type: "tel",
|
|
1600
|
-
placeholder:
|
|
1611
|
+
placeholder: f("cardExpiry"),
|
|
1601
1612
|
// Always hide error initially
|
|
1602
1613
|
error: !1,
|
|
1603
|
-
errorMsg:
|
|
1614
|
+
errorMsg: p,
|
|
1604
1615
|
value: d,
|
|
1605
1616
|
autocomplete: b,
|
|
1606
1617
|
onChange: (y) => {
|
|
@@ -1615,7 +1626,7 @@ class $t extends m {
|
|
|
1615
1626
|
fontFamily: t.styles.fontFamily
|
|
1616
1627
|
}
|
|
1617
1628
|
}), this.cardExpiry.addEventListener("blur", (y) => {
|
|
1618
|
-
this.trimCardExpiry(),
|
|
1629
|
+
this.trimCardExpiry(), p && g && this.cardExpiry.setError(!0, p), I(y);
|
|
1619
1630
|
}), this.cardExpiry.addEventListener("keydown", (y) => {
|
|
1620
1631
|
const x = y, R = [
|
|
1621
1632
|
"Backspace",
|
|
@@ -1639,19 +1650,19 @@ class $t extends m {
|
|
|
1639
1650
|
const E = document.createElement("div");
|
|
1640
1651
|
if (E.className = "error-messages-container", E.style.width = "100%", E.style.transition = "height 0.3s ease-in-out, opacity 0.3s ease-in-out", E.style.overflow = "hidden", E.style.height = "0px", E.style.opacity = "0", this.getElement().appendChild(k), this.getElement().appendChild(E), (a || l) && !s) {
|
|
1641
1652
|
const y = new C({
|
|
1642
|
-
text:
|
|
1653
|
+
text: f("validation.cardNumberInvalid")
|
|
1643
1654
|
});
|
|
1644
1655
|
this.validationMessages.set("cardNumber", y), E.appendChild(y.getElement());
|
|
1645
1656
|
}
|
|
1646
1657
|
if ((r || c) && !n) {
|
|
1647
1658
|
const y = new C({
|
|
1648
|
-
text:
|
|
1659
|
+
text: f("validation.cardSecurityFormat")
|
|
1649
1660
|
});
|
|
1650
1661
|
this.validationMessages.set("cardCvv", y), E.appendChild(y.getElement());
|
|
1651
1662
|
}
|
|
1652
|
-
if (
|
|
1663
|
+
if (p && g) {
|
|
1653
1664
|
const y = new C({
|
|
1654
|
-
text:
|
|
1665
|
+
text: p
|
|
1655
1666
|
});
|
|
1656
1667
|
this.validationMessages.set("cardExpiry", y), E.appendChild(y.getElement());
|
|
1657
1668
|
}
|
|
@@ -1666,16 +1677,16 @@ class $t extends m {
|
|
|
1666
1677
|
if (a.test(r)) {
|
|
1667
1678
|
const d = r.match(a);
|
|
1668
1679
|
if (d && d.length === 3) {
|
|
1669
|
-
const
|
|
1670
|
-
r = `${
|
|
1680
|
+
const p = d[1], g = d[2].slice(2);
|
|
1681
|
+
r = `${p} / ${g}`;
|
|
1671
1682
|
}
|
|
1672
1683
|
}
|
|
1673
1684
|
const s = /^(\d{2})\/(\d{2})$/;
|
|
1674
1685
|
if (s.test(r)) {
|
|
1675
1686
|
const d = r.match(s);
|
|
1676
1687
|
if (d && d.length === 3) {
|
|
1677
|
-
const
|
|
1678
|
-
r = `${
|
|
1688
|
+
const p = d[1], g = d[2];
|
|
1689
|
+
r = `${p} / ${g}`;
|
|
1679
1690
|
}
|
|
1680
1691
|
}
|
|
1681
1692
|
this.cardExpiry.setValue(r);
|
|
@@ -1810,34 +1821,38 @@ class Rt {
|
|
|
1810
1821
|
value: t,
|
|
1811
1822
|
onChange: i,
|
|
1812
1823
|
onBlur: a,
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1824
|
+
onTab: r,
|
|
1825
|
+
error: s,
|
|
1826
|
+
errorMsg: n,
|
|
1827
|
+
checkoutProfile: l,
|
|
1828
|
+
translationFunc: c,
|
|
1829
|
+
autocomplete: h = "email"
|
|
1818
1830
|
} = e;
|
|
1819
1831
|
this.input = new z({
|
|
1820
1832
|
name: "email",
|
|
1821
|
-
label:
|
|
1833
|
+
label: c("email"),
|
|
1822
1834
|
// Always hide error initially - we'll show it only on blur if needed
|
|
1823
1835
|
error: !1,
|
|
1824
|
-
errorMsg:
|
|
1836
|
+
errorMsg: n,
|
|
1825
1837
|
styles: {
|
|
1826
|
-
color:
|
|
1827
|
-
borderRadius: `${
|
|
1828
|
-
fontSize:
|
|
1829
|
-
fontFamily:
|
|
1838
|
+
color: l.styles.textColor,
|
|
1839
|
+
borderRadius: `${l.styles.borderRadius}px`,
|
|
1840
|
+
fontSize: l.styles.fontSize,
|
|
1841
|
+
fontFamily: l.styles.fontFamily
|
|
1830
1842
|
},
|
|
1831
|
-
placeholder:
|
|
1843
|
+
placeholder: c("email"),
|
|
1832
1844
|
type: "email",
|
|
1833
1845
|
value: t,
|
|
1834
|
-
autocomplete:
|
|
1846
|
+
autocomplete: h,
|
|
1835
1847
|
// Wrap the original onChange to apply trim and hide errors during typing
|
|
1836
|
-
onChange: (
|
|
1837
|
-
this.input.setError(!1), this.trim(), i(
|
|
1848
|
+
onChange: (d) => {
|
|
1849
|
+
this.input.setError(!1), this.trim(), i(d);
|
|
1838
1850
|
}
|
|
1839
|
-
}), this.input.addEventListener("blur", (
|
|
1840
|
-
|
|
1851
|
+
}), this.input.addEventListener("blur", (d) => {
|
|
1852
|
+
s && this.input.setError(s, n), a(d);
|
|
1853
|
+
}), r && this.input.addEventListener("keydown", (d) => {
|
|
1854
|
+
const p = d;
|
|
1855
|
+
p.key === "Tab" && !p.shiftKey && (p.preventDefault(), r());
|
|
1841
1856
|
});
|
|
1842
1857
|
}
|
|
1843
1858
|
getValue() {
|
|
@@ -1980,8 +1995,8 @@ class Kt extends m {
|
|
|
1980
1995
|
return this.paymentMethods.size > 0 && this.getElement().style.display !== "none";
|
|
1981
1996
|
}
|
|
1982
1997
|
}
|
|
1983
|
-
const
|
|
1984
|
-
class
|
|
1998
|
+
const qt = 17;
|
|
1999
|
+
class jt extends m {
|
|
1985
2000
|
styles;
|
|
1986
2001
|
isHovered = !1;
|
|
1987
2002
|
constructor(e) {
|
|
@@ -1992,7 +2007,7 @@ class qt extends m {
|
|
|
1992
2007
|
}
|
|
1993
2008
|
applyStyles() {
|
|
1994
2009
|
const e = this.getElement();
|
|
1995
|
-
e.style.backgroundColor = this.isHovered ? `color-mix(in srgb, ${this.styles.backgroundColor} 80%, transparent)` : this.styles.backgroundColor, e.disabled ? (e.style.color = "rgb(150, 150, 150)", e.style.backgroundColor = "rgb(200, 200, 200)") : e.style.color = this.styles.color, e.style.borderRadius = this.styles.borderRadius ===
|
|
2010
|
+
e.style.backgroundColor = this.isHovered ? `color-mix(in srgb, ${this.styles.backgroundColor} 80%, transparent)` : this.styles.backgroundColor, e.disabled ? (e.style.color = "rgb(150, 150, 150)", e.style.backgroundColor = "rgb(200, 200, 200)") : e.style.color = this.styles.color, e.style.borderRadius = this.styles.borderRadius === qt ? "100vmax" : `${this.styles.borderRadius}px`, e.style.fontSize = `${this.styles.fontSize}px`, e.style.fontFamily = `${this.styles.fontFamily}, sans-serif`;
|
|
1996
2011
|
}
|
|
1997
2012
|
handleMouseEnter() {
|
|
1998
2013
|
this.isHovered = !0, this.applyStyles();
|
|
@@ -2008,7 +2023,7 @@ class Ut {
|
|
|
2008
2023
|
button;
|
|
2009
2024
|
constructor(e) {
|
|
2010
2025
|
const { disabled: t, checkoutProfile: i, translationFunc: a } = e;
|
|
2011
|
-
this.button = new
|
|
2026
|
+
this.button = new jt({
|
|
2012
2027
|
text: a(
|
|
2013
2028
|
`buttonTexts.${i?.layout.actionButton.translationKey}`
|
|
2014
2029
|
),
|
|
@@ -2296,6 +2311,7 @@ class Yt extends m {
|
|
|
2296
2311
|
value: t.email,
|
|
2297
2312
|
onChange: this.handleChange,
|
|
2298
2313
|
onBlur: this.handleBlur,
|
|
2314
|
+
onTab: () => this.focusManager.focusField("cardNumber"),
|
|
2299
2315
|
error: !!(i.email && a.email),
|
|
2300
2316
|
errorMsg: i.email,
|
|
2301
2317
|
checkoutProfile: e,
|
|
@@ -2431,11 +2447,9 @@ class Yt extends m {
|
|
|
2431
2447
|
formData: null,
|
|
2432
2448
|
tokenexData: null
|
|
2433
2449
|
// No tokenization for PayPal
|
|
2434
|
-
})
|
|
2450
|
+
});
|
|
2435
2451
|
} catch {
|
|
2436
|
-
this.setErrorMessage("PayPal processing failed. Please try again.");
|
|
2437
|
-
} finally {
|
|
2438
|
-
this.hideSpinner(), this.isSubmitting = !1, this.updateFormUI();
|
|
2452
|
+
this.setErrorMessage("PayPal processing failed. Please try again."), this.hideSpinner(), this.isSubmitting = !1, this.updateFormUI();
|
|
2439
2453
|
}
|
|
2440
2454
|
};
|
|
2441
2455
|
// Public methods
|
|
@@ -2640,7 +2654,7 @@ export {
|
|
|
2640
2654
|
ye as enLocale,
|
|
2641
2655
|
we as esLocale,
|
|
2642
2656
|
De as frLocale,
|
|
2643
|
-
|
|
2657
|
+
je as itLocale,
|
|
2644
2658
|
Qe as plLocale,
|
|
2645
2659
|
lt as ptLocale,
|
|
2646
2660
|
yt as trLocale
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.form-container{display:flex;flex-direction:column;gap:24px;padding:4px;position:relative;min-height:340px;max-width:100%;text-align:left}.form-container>*{font-family:inherit}.card-details{display:flex}.error-messages-container>*{display:none}.error-messages-container>*:first-child{display:block}@keyframes slideIn{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.error-alert{background-color:#fef2f2;border:1px solid #fecaca;border-radius:8px;padding:16px;box-shadow:0 1px 3px #0000001a,0 1px 2px #0000000f;animation:slideIn .3s ease-out}.error-alert-content{display:flex;align-items:flex-start;gap:12px}.error-alert-icon-container{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:32px;height:32px;background-color:#fee2e2;border-radius:50%;color:#dc2626}.error-alert-icon{color:#dc2626}.error-alert-text-container{flex:1;min-width:0}.error-alert-title{margin:0 0 4px;font-size:14px;font-weight:600;color:#991b1b;line-height:1.4}.error-alert-message{margin:0;font-size:14px;color:#7f1d1d;line-height:1.5;word-break:break-word}.skeleton-container{display:flex;flex-direction:column;gap:24px;padding:4px;position:relative;max-width:100%;text-align:left;position:absolute;inset:0;height:100%;width:100%;background:#fff;z-index:9999}.skeleton{background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0,#f0f0f0 75%);background-size:200% 100%;border-radius:8px;animation:shimmer 1.5s ease-in-out infinite;position:relative;overflow:hidden}@keyframes shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}.skeleton-field{display:flex;flex-direction:column;gap:8px}.skeleton-label{height:16px;width:80px;border-radius:4px}.skeleton-input,.skeleton-payment-method{height:35px;width:100%;border-radius:8px}.skeleton-card-row{display:flex;gap:12px}.skeleton-card-row .skeleton-field{flex:1}.skeleton-submit-button{height:35px;width:100%;border-radius:8px}.skeleton-separator-text{height:14px;width:100px;border-radius:4px}.payment-separator_container{width:100%;display:flex;align-items:center;justify-content:space-between;gap:16px}@media only screen and (max-width: 600px){.skeleton-container{gap:20px;min-height:320px}}.blur-bg{position:absolute;inset:0;height:100%;width:100%;background:transparent;display:flex;flex-direction:column;align-items:center;justify-content:center;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(3.5px);z-index:9999}.loader{width:64px;height:64px;border:
|
|
1
|
+
.form-container{display:flex;flex-direction:column;gap:24px;padding:4px;position:relative;min-height:340px;max-width:100%;text-align:left}.form-container>*{font-family:inherit}.card-details{display:flex}.error-messages-container>*{display:none}.error-messages-container>*:first-child{display:block}@keyframes slideIn{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.error-alert{background-color:#fef2f2;border:1px solid #fecaca;border-radius:8px;padding:16px;box-shadow:0 1px 3px #0000001a,0 1px 2px #0000000f;animation:slideIn .3s ease-out}.error-alert-content{display:flex;align-items:flex-start;gap:12px}.error-alert-icon-container{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:32px;height:32px;background-color:#fee2e2;border-radius:50%;color:#dc2626}.error-alert-icon{color:#dc2626}.error-alert-text-container{flex:1;min-width:0}.error-alert-title{margin:0 0 4px;font-size:14px;font-weight:600;color:#991b1b;line-height:1.4}.error-alert-message{margin:0;font-size:14px;color:#7f1d1d;line-height:1.5;word-break:break-word}.skeleton-container{display:flex;flex-direction:column;gap:24px;padding:4px;position:relative;max-width:100%;text-align:left;position:absolute;inset:0;height:100%;width:100%;background:#fff;z-index:9999}.skeleton{background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0,#f0f0f0 75%);background-size:200% 100%;border-radius:8px;animation:shimmer 1.5s ease-in-out infinite;position:relative;overflow:hidden}@keyframes shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}.skeleton-field{display:flex;flex-direction:column;gap:8px}.skeleton-label{height:16px;width:80px;border-radius:4px}.skeleton-input,.skeleton-payment-method{height:35px;width:100%;border-radius:8px}.skeleton-card-row{display:flex;gap:12px}.skeleton-card-row .skeleton-field{flex:1}.skeleton-submit-button{height:35px;width:100%;border-radius:8px}.skeleton-separator-text{height:14px;width:100px;border-radius:4px}.payment-separator_container{width:100%;display:flex;align-items:center;justify-content:space-between;gap:16px}@media only screen and (max-width: 600px){.skeleton-container{gap:20px;min-height:320px}}.blur-bg{position:absolute;inset:0;height:100%;width:100%;background:transparent;display:flex;flex-direction:column;align-items:center;justify-content:center;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(3.5px);z-index:9999}.loader{width:64px;height:64px;border-radius:50%;background:conic-gradient(from 270deg,#134e4a 0deg,#0f766e 90deg,#0d9488 180deg,#5eaba3 240deg,rgba(13,148,136,.2) 300deg,transparent 330deg);animation:spin 1s linear infinite;position:relative}.loader:before{content:"";position:absolute;inset:6px;border-radius:50%;background:#fff}@keyframes spin{to{transform:rotate(360deg)}}.title{margin-top:20px;font-size:18px;color:#4f4f4f;animation:fadeIn 1s ease-in-out}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.input-wrapper{display:flex;flex-direction:column;width:100%;min-width:0;flex-grow:1;flex-basis:0;box-sizing:border-box;align-items:stretch}.input-wrapper *{box-sizing:border-box}.form-input{opacity:1;font-weight:400;letter-spacing:.02em;transition:box-shadow .1s ease-in,border-radius .2s ease-in;box-shadow:0 0 0 1px #e0e0e0,0 2px 4px #00000012,0 1px 1.5px #0000000d;background:#fff;padding:8px 12px;border:none;outline:none;line-height:1.5;z-index:0;box-sizing:border-box;min-height:0;flex:1}.form-input-error{color:#dc2727}.form-input::placeholder{color:#717173;opacity:.3}.form-input:focus{box-shadow:0 0 0 1px #3297d3b3,0 1px 1px #00000012,0 0 0 4px #3297d34d;z-index:2}.form-helper-text{color:#dc2727;font-size:12px;font-weight:500;margin-top:4px;display:block;overflow:hidden;max-height:100px;transition:max-height .3s ease-in-out,opacity .3s ease-in-out,margin .3s ease-in-out}.form-helper-text-hidden{max-height:0;opacity:0;margin-top:0;overflow:hidden}.input-label{margin-bottom:6px}.card-element{position:relative;height:38.5px;transition:box-shadow .1s ease-in;box-shadow:0 0 0 1px #e0e0e0,0 2px 4px #00000012,0 1px 1.5px #0000000d;padding:0;border:none;background:#fff;border-radius:inherit;box-sizing:border-box}.card-element iframe{width:100%;min-width:0;display:block}.card-element-focus{box-shadow:0 0 0 1px #3297d3b3,0 1px 1px #00000012,0 0 0 4px #3297d34d}.card-icon{width:16px;transition:opacity .6s ease-in;opacity:1}.card-icon img{max-width:100%;display:block;height:auto}.cards-position{position:absolute;z-index:10;right:20px;top:8px;display:flex;align-items:center;gap:8px;pointer-events:none}.loading{position:relative}.loading:after{content:"";position:absolute;inset:0;height:100%;width:100%;background-color:#fff;border-radius:inherit}@media only screen and (min-width: 600px){.card-icon{width:20px}}.paypal{background-color:#ffc439;color:#253b80;font-weight:700;padding:8px 16px;box-shadow:0 2px 4px #0000001a;text-transform:none;cursor:pointer;border-radius:4px}.paypal:hover{background-color:#ffc439;filter:brightness(.95)}.paypal-icon-container{display:flex;align-items:center;justify-content:center}.paypal-icon-container img{width:69px;height:22px}.payment-separator{width:100%;display:flex;align-items:center;justify-content:space-between;margin:12px 0 -16px}.payment-separator__line{height:1.3px;flex-grow:1;background:#9f9f9f}.payment-separator__text{font-size:14px;color:#0d0d0d;padding:0 16px;margin:0;font-weight:400}.button{position:relative;display:inline-flex;align-items:center;justify-content:center;padding:8px 16px;font-size:14px;font-weight:500;line-height:1.5;text-align:center;cursor:pointer;transition:all .2s ease;font-weight:700;border:none;outline:none;white-space:nowrap;height:min-content;width:100%}.disabled{pointer-events:none}.valid{outline:none;overflow:hidden;transition:all .3s ease}.valid:before{content:"";position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.4),transparent);transition:left .5s;animation:glowSlide 6s infinite}@keyframes glowSlide{0%{left:-100%}50%{left:100%}to{left:100%}}.valid:after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.1) 25%,rgba(255,255,255,.3) 50%,rgba(255,255,255,.1) 75%,transparent 100%);transform:translate(-100%);animation:smoothGlow 7s infinite}@keyframes smoothGlow{0%{transform:translate(-100%)}to{transform:translate(100%)}}
|
package/dist/package.json
CHANGED