@wix/form-elements 1.61.0 → 1.63.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/component/{appointment-rac-CTKF3-Jr.js → appointment-rac-B1VVk_Ui.js} +3 -3
- package/dist/component/{bookings-address-rac-gBn88bZA.js → bookings-address-rac-IQeHFdHT.js} +1 -1
- package/dist/component/{bookings-email-rac-C7TKRvTj.js → bookings-email-rac-z26A790r.js} +1 -1
- package/dist/component/{bookings-first-name-rac-C5wAAcjj.js → bookings-first-name-rac-Djf0GPP4.js} +1 -1
- package/dist/component/{bookings-header-rac-Dv81vh1Z.js → bookings-header-rac-CXOzAOpz.js} +1 -1
- package/dist/component/{bookings-last-name-rac-DylKhXli.js → bookings-last-name-rac-CbB8alM9.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DCr8PseD.js → bookings-login-bar-rac-CXrLx7Pn.js} +16 -16
- package/dist/component/{bookings-phone-rac-Cem6T4kN.js → bookings-phone-rac-DGYx7h5g.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-B9CXzAM3.js → bookings-rich-text-rac-viJG57XF.js} +1 -1
- package/dist/component/checkbox-field-rac-e-RAmupX.js +1312 -0
- package/dist/component/{checkbox-group-field-headless-VzENoIsb.js → checkbox-group-field-headless-Cvia4lL6.js} +30 -30
- package/dist/component/{checkbox-group-field-rac-BYq7Rkja.js → checkbox-group-field-rac-BXxk90dk.js} +1 -1
- package/dist/component/{checkbox-group-rac-BMdQUrnq.js → checkbox-group-rac-CDfDTWqz.js} +1 -1
- package/dist/component/{checkbox-rac-s_6gOTt9.js → checkbox-rac-BRBKYD_5.js} +1 -1
- package/dist/component/{contacts-address-rac-Btk7NX5p.js → contacts-address-rac-BtWWQi77.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-C-Vqjs2i.js → contacts-birthdate-rac-DaEUXJTf.js} +1 -1
- package/dist/component/{contacts-company-rac-DJdSHFAG.js → contacts-company-rac-IgRyjtcM.js} +1 -1
- package/dist/component/{contacts-email-rac-BX7tSRIa.js → contacts-email-rac-BS1MDrMk.js} +1 -1
- package/dist/component/{contacts-first-name-rac-jyVnjAH8.js → contacts-first-name-rac-BAvXypDF.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Ca8W_-d3.js → contacts-last-name-rac-C289RYPl.js} +1 -1
- package/dist/component/{contacts-phone-rac-B3lVx79m.js → contacts-phone-rac-DIpyskam.js} +1 -1
- package/dist/component/{contacts-position-rac-D4utrlBz.js → contacts-position-rac-nPeh3lKU.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-V1p9UnIO.js → contacts-subscribe-rac-Ci5OLk68.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-BCFMQf3P.js → contacts-tax-id-rac-C4WB-SR0.js} +1 -1
- package/dist/component/{date-availability-sElYepkM.js → date-availability-HHjPx4Uv.js} +1 -1
- package/dist/component/{date-input-field-rac-BVRp-Q9t.js → date-input-field-rac-GFgFcpX2.js} +17 -17
- package/dist/component/{date-input-rac-OVoxroB_.js → date-input-rac-B9BUEIA-.js} +1 -1
- package/dist/component/{date-picker-field-rac-vOmCmb8f.js → date-picker-field-rac-BfjYIIuY.js} +4 -4
- package/dist/component/{date-picker-rac-BViyESWE.js → date-picker-rac-Bd2UN0ZF.js} +1 -1
- package/dist/component/{date-time-input-field-rac-CmTGH0Ur.js → date-time-input-field-rac-CAXnxLQP.js} +78 -78
- package/dist/component/{date-time-input-rac-DhuQjbd-.js → date-time-input-rac-BuJ3Awlh.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-DiK0ofyJ.js → dext-checkbox-group-rac-DKp4cBVa.js} +2 -2
- package/dist/component/{dext-checkbox-rac-hsIaGjBL.js → dext-checkbox-rac-BMu_k06A.js} +1 -1
- package/dist/component/{dext-date-picker-rac-BkEDrDm9.js → dext-date-picker-rac-L3sdldhT.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-CCwMKmSa.js → dext-date-time-input-rac-UmabFzDN.js} +1 -1
- package/dist/component/{dext-dropdown-rac-CtoqxSUG.js → dext-dropdown-rac-DbjgYaG-.js} +1 -1
- package/dist/component/{dext-email-rac-BvK4NOz2.js → dext-email-rac-rNudrOOK.js} +1 -1
- package/dist/component/{dext-number-input-rac-CYgCbltu.js → dext-number-input-rac-hw1FTrJL.js} +1 -1
- package/dist/component/{dext-phone-rac-eQ9DRDh0.js → dext-phone-rac-DrZ_Vwv2.js} +1 -1
- package/dist/component/{dext-radio-group-rac-D1j2iY7w.js → dext-radio-group-rac-DAt2ax-I.js} +2 -2
- package/dist/component/{dext-rating-input-rac-C482gkW3.js → dext-rating-input-rac-BW2Ike11.js} +1 -1
- package/dist/component/{dext-tags-rac-4fBjF0ou.js → dext-tags-rac-DDzwlKrR.js} +2 -2
- package/dist/component/{dext-text-area-rac-7Vg2U7Mu.js → dext-text-area-rac-D0xf4z3z.js} +1 -1
- package/dist/component/{dext-text-input-rac-CGhjmk-l.js → dext-text-input-rac-Da04OLmq.js} +1 -1
- package/dist/component/{dext-url-input-rac-LwoSpkJq.js → dext-url-input-rac-B-g4xTqh.js} +1 -1
- package/dist/component/{donation-rac-sABSCHMJ.js → donation-rac-gKeq72jg.js} +10 -10
- package/dist/component/{dropdown-field-headless-C0Pk5_33.js → dropdown-field-headless-Js5TxdU4.js} +14 -14
- package/dist/component/{dropdown-field-rac-Gpctf74Y.js → dropdown-field-rac-BDxcvX00.js} +1 -1
- package/dist/component/{dropdown-rac-DKHO9H4r.js → dropdown-rac-B5UHNzV-.js} +1 -1
- package/dist/component/{ecom-address-rac-BR6IpZFw.js → ecom-address-rac-0zm4bX37.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-v6GRysJr.js → ecom-subscription-checkbox-rac-DCXoI33l.js} +2 -2
- package/dist/component/{email-input-field-rac-CoD-mJA-.js → email-input-field-rac-svf6hUHF.js} +2 -2
- package/dist/component/{events-repeater-rac-CH5fjXUm.js → events-repeater-rac-DMIqzuVK.js} +29 -29
- package/dist/component/{events-rsvp-rac-HfajrqWn.js → events-rsvp-rac-B_YD4ckO.js} +1 -1
- package/dist/component/{field-error-headless-B5J2ESBQ.js → field-error-headless-DTKnr5Zx.js} +6 -6
- package/dist/component/{field-label-headless-g8SR5uWH.js → field-label-headless-DV4aNd5Y.js} +5 -5
- package/dist/component/{file-upload-rac-CuWH6kzP.js → file-upload-rac-lGKJjG3m.js} +49 -49
- package/dist/component/{fixed-payment-rac-DDCoECZF.js → fixed-payment-rac-BVS6glii.js} +13 -13
- package/dist/component/{form-Cd3D7IPH.js → form-DzjdnO7t.js} +2271 -2267
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-B86qWasN.js → header-field-rac-tzBH-8Yh.js} +5 -5
- package/dist/component/{header-rac-CKI3uVHK.js → header-rac-6thQAvVF.js} +1 -1
- package/dist/component/{image-choice-rac-BX9iq3FQ.js → image-choice-rac-Dx1b-saW.js} +23 -23
- package/dist/component/{index-BD0o63Sr.js → index-DIP7KB8P.js} +2 -2
- package/dist/component/{index-B1OGAoBr.js → index-Lnx0829a.js} +4 -4
- package/dist/component/isObjectLike-B_1KizZV.js +86 -0
- package/dist/component/multiline-address-field-rac-BY2SUp2d.js +1613 -0
- package/dist/component/{multiline-address-rac-pz8SF31j.js → multiline-address-rac-BL8Yp4F0.js} +1 -1
- package/dist/component/{number-input-field-rac-Du1lioEq.js → number-input-field-rac-x0yFmXbe.js} +14 -14
- package/dist/component/{number-input-rac-CX5zLtYJ.js → number-input-rac-pJXc2YsD.js} +1 -1
- package/dist/component/{password-rac-Gg7TJanM.js → password-rac-B4XCP64b.js} +19 -19
- package/dist/component/{payment-input-rac-DZcNoPdt.js → payment-input-rac-CZdOAjK4.js} +12 -12
- package/dist/component/{phone-input-field-rac-DXjS0M3S.js → phone-input-field-rac-DO_V5Z_T.js} +19 -19
- package/dist/component/{phone-rac-B4__qDbh.js → phone-rac-D16nLDjP.js} +1 -1
- package/dist/component/{product-list-rac-BZkCqyAe.js → product-list-rac-DER8gVqy.js} +44 -44
- package/dist/component/{quiz-radio-group-rac-Bl-4IPWK.js → quiz-radio-group-rac-BgTmHHi4.js} +1 -1
- package/dist/component/{radio-group-field-rac-YMWHcvyM.js → radio-group-field-rac-Dt2pU0VV.js} +1 -1
- package/dist/component/{radio-group-field-rac.module-DAtE0KVG.js → radio-group-field-rac.module--sO0VqCA.js} +12 -12
- package/dist/component/{radio-group-rac-DsidBDwT.js → radio-group-rac-CqCmtkNQ.js} +1 -1
- package/dist/component/{rating-input-field-rac-wrhjzIr8.js → rating-input-field-rac-xDrHHcL2.js} +10 -10
- package/dist/component/{rating-input-rac-uoY8q1LS.js → rating-input-rac-Bo5E9N87.js} +1 -1
- package/dist/component/{rich-content-rac.module-CJQVma69.js → rich-content-rac.module-CJXbNca9.js} +4 -4
- package/dist/component/{rich-text-field-rac-Dm-9BjTR.js → rich-text-field-rac-CkV0Z9F-.js} +5 -5
- package/dist/component/{rich-text-rac-k4a8Eawy.js → rich-text-rac-59DbKpXz.js} +1 -1
- package/dist/component/{service-dropdown-rac-CBOZY8wj.js → service-dropdown-rac-BLnflnUr.js} +25 -25
- package/dist/component/{services-multi-choice-rac-DTkLnNLM.js → services-multi-choice-rac-C-bFjwx8.js} +6 -6
- package/dist/component/{signature-rac-CMDroAUe.js → signature-rac-Bb5IaS28.js} +15 -15
- package/dist/component/{submit-button-rac-f339m0YR.js → submit-button-rac-Bjyi8sUA.js} +12 -12
- package/dist/component/{tags-field-rac-ChvUyucB.js → tags-field-rac-C_VO3_69.js} +12 -12
- package/dist/component/{tags-rac-D-KUrSn_.js → tags-rac-CKiutCWe.js} +1 -1
- package/dist/component/{text-area-field-rac-BKTMRopV.js → text-area-field-rac-Cg-vIhFe.js} +12 -12
- package/dist/component/{text-area-rac-C1cecxIB.js → text-area-rac-tMFx38UD.js} +1 -1
- package/dist/component/{text-input-field-rac-Drw_3E1W.js → text-input-field-rac-CgN_2hOD.js} +1 -1
- package/dist/component/{text-input-headless-CFi61Cyb.js → text-input-headless-CkhvKrFp.js} +6 -6
- package/dist/component/{text-input-rac-CSKYfTyX.js → text-input-rac-BsyBgd3b.js} +1 -1
- package/dist/component/{time-input-rac-D2ALW8mD.js → time-input-rac-BxRVJtHE.js} +12 -12
- package/dist/component/{url-input-field-rac-BLd1-70z.js → url-input-field-rac-B_1yVniS.js} +12 -12
- package/dist/component/{url-input-rac-CJ0W10C7.js → url-input-rac-D8VrKYVe.js} +1 -1
- package/dist/component/{use-service-options-base-CFrVxHKr.js → use-service-options-base-Ci9gIluo.js} +7 -7
- package/package.json +2 -14
- package/dist/component/checkbox-field-rac-BPsvcqaB.js +0 -625
- package/dist/component/isObject-BAwJJxQ3.js +0 -34
- package/dist/component/multiline-address-field-rac-BWfGsGnK.js +0 -1574
|
@@ -0,0 +1,1613 @@
|
|
|
1
|
+
import { RicosViewer as X } from "@wix/ricos/viewer";
|
|
2
|
+
import C from "classnames";
|
|
3
|
+
import n, { useMemo as w, createContext as We, useContext as De, useState as ye, useRef as B, useCallback as D, useEffect as Ve } from "react";
|
|
4
|
+
import { UNSAFE_PortalProvider as _t } from "react-aria";
|
|
5
|
+
import { ac as bt, c as ft, a9 as Pt, ab as yt, G as Tt, H as qt, u as Mt, z as V, F as K, ar as qe, a2 as at, ah as P, ae as T, aj as le, ad as Ct, Q as wt, C as he, a0 as xt, a4 as Bt, ao as kt, ai as $t, an as Ut, a7 as Wt, Y as Vt, a6 as Kt, ak as Yt, j as Ht } from "./form-DzjdnO7t.js";
|
|
6
|
+
import { f as E, a as h } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { F as jt, V as Jt } from "./headless-styles-CmcyA_pi.js";
|
|
8
|
+
import { TextField as Ce, Input as ie, ComboBoxStateContext as It, ComboBox as Re, Popover as Ae, ListBox as _e, ListBoxItem as Pe, Group as Lt, Button as Nt } from "react-aria-components";
|
|
9
|
+
import { D as ce, E as de } from "./field-error-headless-DTKnr5Zx.js";
|
|
10
|
+
import { L as ue } from "./field-label-headless-DV4aNd5Y.js";
|
|
11
|
+
import { e as Gt, c as Xt, a as zt, r as Ot } from "./isObjectLike-B_1KizZV.js";
|
|
12
|
+
import { u as Qt } from "./use-invoke-callback-UH73A_J3.js";
|
|
13
|
+
import { C as lt } from "./chevron-down-icon-CcpVm6B-.js";
|
|
14
|
+
import { E as z } from "./error-icon-hZxQ6DEy.js";
|
|
15
|
+
import { H as fe } from "./custom-focus-class-_483Pkwp.js";
|
|
16
|
+
import { s as f } from "./field-rac.module-DtugsLiL.js";
|
|
17
|
+
import { r as Q, H as Z, q as ee, u as ge, l as te, h as ne } from "./form-element-classes-Bi-nNM8q.js";
|
|
18
|
+
const Zt = (e, t, o) => {
|
|
19
|
+
var a, l, i, s;
|
|
20
|
+
const r = (a = e.steps) == null ? void 0 : a.map((d) => {
|
|
21
|
+
var m, u, I, L, b, p;
|
|
22
|
+
return {
|
|
23
|
+
...d,
|
|
24
|
+
layout: {
|
|
25
|
+
...d.layout,
|
|
26
|
+
large: {
|
|
27
|
+
...(m = d.layout) == null ? void 0 : m.large,
|
|
28
|
+
items: ((L = (I = (u = d.layout) == null ? void 0 : u.large) == null ? void 0 : I.items) == null ? void 0 : L.map((y) => ({
|
|
29
|
+
...y,
|
|
30
|
+
row: o.row <= y.row ? (y.row || 0) + 1 : y.row
|
|
31
|
+
}))) || ((p = (b = d.layout) == null ? void 0 : b.large) == null ? void 0 : p.items)
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
return (s = (i = (l = r == null ? void 0 : r[0].layout) == null ? void 0 : l.large) == null ? void 0 : i.items) == null || s.unshift(o), {
|
|
37
|
+
...e,
|
|
38
|
+
fields: [
|
|
39
|
+
t,
|
|
40
|
+
...e.fields || []
|
|
41
|
+
],
|
|
42
|
+
steps: r || e.steps
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
var Ie = /* @__PURE__ */ (function(e) {
|
|
46
|
+
return e.COUNTRY = "country", e.SUBDIVISION = "subdivision", e.CITY = "city", e.ADDRESS_LINE = "addressLine", e.ADDRESS_LINE_2 = "addressLine2", e.POSTAL_CODE = "postalCode", e.STREET_NAME = "streetName", e.STREET_NUMBER = "streetNumber", e.APARTMENT = "apartment", e;
|
|
47
|
+
})({});
|
|
48
|
+
function en(e, t, o = !1) {
|
|
49
|
+
const { country: r, subdivision: a, city: l, addressLine: i, streetAddress: s, addressLine2: d, postalCode: m } = e, u = {};
|
|
50
|
+
return t ? (r && (u.country = r), a && (u.subdivision = a), l && (u.city = l), i ? u.addressLine = i : s != null && s.formattedAddressLine && (u.addressLine = s == null ? void 0 : s.formattedAddressLine), d && (u.addressLine = d), m && (u.postalCode = m), s != null && s.apt && (u.apartment = s == null ? void 0 : s.apt), s != null && s.name ? u.streetName = s == null ? void 0 : s.name : o && (s != null && s.formattedAddressLine) && (u.streetName = s == null ? void 0 : s.formattedAddressLine), s != null && s.number && (u.streetNumber = s.number)) : (r && (u.country = r), a && (u.subdivision = a), l && (u.city = l), i ? u.address_line = i : s != null && s.formattedAddressLine && (u.address_line = s == null ? void 0 : s.formattedAddressLine), d && (u.address_line = d), m && (u.postal_code = m), s != null && s.apt && (u.apartment = s == null ? void 0 : s.apt), s != null && s.name ? u.street_name = s == null ? void 0 : s.name : o && (s != null && s.formattedAddressLine) && (u.street_name = s == null ? void 0 : s.formattedAddressLine), s != null && s.number && (u.street_number = s.number)), u;
|
|
51
|
+
}
|
|
52
|
+
const gt = /* @__PURE__ */ We({
|
|
53
|
+
onAddressSelect: () => {
|
|
54
|
+
}
|
|
55
|
+
}), tn = ({ children: e, onAddressSelect: t, autocompleteEnabled: o }) => {
|
|
56
|
+
const r = w(() => ({
|
|
57
|
+
onAddressSelect: t,
|
|
58
|
+
autocompleteEnabled: o
|
|
59
|
+
}), [
|
|
60
|
+
t,
|
|
61
|
+
o
|
|
62
|
+
]);
|
|
63
|
+
return /* @__PURE__ */ n.createElement(gt.Provider, {
|
|
64
|
+
value: r
|
|
65
|
+
}, e);
|
|
66
|
+
};
|
|
67
|
+
function Le() {
|
|
68
|
+
return De(gt);
|
|
69
|
+
}
|
|
70
|
+
const vt = /* @__PURE__ */ We(void 0), nn = ({ children: e, countryCode: t }) => {
|
|
71
|
+
const o = w(() => ({
|
|
72
|
+
countryCode: t
|
|
73
|
+
}), [
|
|
74
|
+
t
|
|
75
|
+
]);
|
|
76
|
+
return /* @__PURE__ */ n.createElement(vt.Provider, {
|
|
77
|
+
value: o
|
|
78
|
+
}, e);
|
|
79
|
+
};
|
|
80
|
+
function Ne() {
|
|
81
|
+
const e = De(vt);
|
|
82
|
+
return e == null ? void 0 : e.countryCode;
|
|
83
|
+
}
|
|
84
|
+
function Me(e) {
|
|
85
|
+
return e != null;
|
|
86
|
+
}
|
|
87
|
+
function rn(e, t, o) {
|
|
88
|
+
return !t || !o ? e : {
|
|
89
|
+
...e,
|
|
90
|
+
fields: (e.fields ?? []).map((r) => {
|
|
91
|
+
const { show: a, ...l } = t[r.target] || {}, { required: i } = o[r.target] || {};
|
|
92
|
+
return {
|
|
93
|
+
...r,
|
|
94
|
+
view: {
|
|
95
|
+
...r.view,
|
|
96
|
+
...l
|
|
97
|
+
},
|
|
98
|
+
...Me(a) && {
|
|
99
|
+
hidden: !a
|
|
100
|
+
},
|
|
101
|
+
...Me(i) && Me(r.validation) && {
|
|
102
|
+
validation: {
|
|
103
|
+
...r.validation,
|
|
104
|
+
required: i
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
})
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
const on = (e, t) => e.map((o) => ({
|
|
112
|
+
...o,
|
|
113
|
+
id: ("target" in o ? t[o.target] : void 0) ?? o.id
|
|
114
|
+
})), ht = 12, sn = (e) => {
|
|
115
|
+
const t = e.filter((r) => !r.properties.hidden), o = e.filter((r) => r.properties.hidden);
|
|
116
|
+
return {
|
|
117
|
+
visibleFields: t,
|
|
118
|
+
hiddenFields: o
|
|
119
|
+
};
|
|
120
|
+
}, an = (e) => {
|
|
121
|
+
const t = {};
|
|
122
|
+
return e.forEach((o) => {
|
|
123
|
+
const r = o.layout.row;
|
|
124
|
+
t[r] || (t[r] = []), t[r].push(o);
|
|
125
|
+
}), t;
|
|
126
|
+
}, ln = (e) => {
|
|
127
|
+
const t = {};
|
|
128
|
+
return Object.keys(e).forEach((o) => {
|
|
129
|
+
const r = parseInt(o, 10), a = e[r];
|
|
130
|
+
a.reduce((i, s) => i + s.layout.width, 0) !== ht && (t[r] = a);
|
|
131
|
+
}), t;
|
|
132
|
+
}, cn = (e, t) => e.map((o) => {
|
|
133
|
+
const r = o.layout.row;
|
|
134
|
+
if (t[r] && !o.properties.hidden) {
|
|
135
|
+
const a = t[r], l = a.length, i = ht / l, s = a.findIndex((m) => m.id === o.id), d = i * s;
|
|
136
|
+
return {
|
|
137
|
+
...o,
|
|
138
|
+
layout: {
|
|
139
|
+
...o.layout,
|
|
140
|
+
width: i,
|
|
141
|
+
column: d
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
return o;
|
|
146
|
+
}), dn = (e, t, o) => {
|
|
147
|
+
const r = Math.max(...t.map((a) => a.layout.row), -1);
|
|
148
|
+
return e.map((a) => {
|
|
149
|
+
if (a.properties.hidden) {
|
|
150
|
+
const l = o.findIndex((i) => i.id === a.id);
|
|
151
|
+
return {
|
|
152
|
+
...a,
|
|
153
|
+
layout: {
|
|
154
|
+
...a.layout,
|
|
155
|
+
row: r + 1 + l
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
return a;
|
|
160
|
+
});
|
|
161
|
+
}, un = (e) => {
|
|
162
|
+
const { visibleFields: t, hiddenFields: o } = sn(e.fields), r = an(t), a = ln(r), l = cn(e.fields, a), i = dn(l, t, o);
|
|
163
|
+
return {
|
|
164
|
+
...e,
|
|
165
|
+
fields: i
|
|
166
|
+
};
|
|
167
|
+
}, mn = () => ({
|
|
168
|
+
country: V(),
|
|
169
|
+
subdivision: V(),
|
|
170
|
+
city: V(),
|
|
171
|
+
address_line: V(),
|
|
172
|
+
address_line_2: V(),
|
|
173
|
+
postal_code: V(),
|
|
174
|
+
street_name: V(),
|
|
175
|
+
street_number: V(),
|
|
176
|
+
apartment: V()
|
|
177
|
+
}), pn = ({ id: e, target: t, fieldType: o, form: r, country: a, fieldSettings: l, validation: i, required: s }) => {
|
|
178
|
+
const [d] = ye(mn), { isExperimentEnabled: m } = bt(), u = m(ft.USE_FIELDS_V2), { getCountryAddressForm: I } = Pt(), { isMobile: L, breakpoint: b } = yt(), p = I(a), y = o === K.MULTILINE_ADDRESS || o === K.BOOKINGS_ADDRESS, N = w(() => {
|
|
179
|
+
var g;
|
|
180
|
+
return Tt(s, (g = i == null ? void 0 : i.predefined) == null ? void 0 : g.multilineAddressOptions);
|
|
181
|
+
}, [
|
|
182
|
+
i,
|
|
183
|
+
s
|
|
184
|
+
]), F = w(() => qt(), []);
|
|
185
|
+
return {
|
|
186
|
+
form: w(() => {
|
|
187
|
+
var _, O;
|
|
188
|
+
if (!y || !p)
|
|
189
|
+
return r && {
|
|
190
|
+
...r,
|
|
191
|
+
fields: on(r.fields, d)
|
|
192
|
+
};
|
|
193
|
+
const g = Mt({
|
|
194
|
+
useFieldsV2: u,
|
|
195
|
+
path: t,
|
|
196
|
+
parentId: e,
|
|
197
|
+
includeHiddenFields: !0,
|
|
198
|
+
isMobile: L,
|
|
199
|
+
breakpoint: b,
|
|
200
|
+
form: rn(Zt(p, N, F), l, (O = (_ = i == null ? void 0 : i.predefined) == null ? void 0 : _.multilineAddressOptions) == null ? void 0 : O.fields)
|
|
201
|
+
});
|
|
202
|
+
if (!g.fields.some((v) => v.properties.hidden))
|
|
203
|
+
return g;
|
|
204
|
+
const q = un(g);
|
|
205
|
+
return {
|
|
206
|
+
...q,
|
|
207
|
+
fields: q.fields.filter((v) => !v.properties.hidden)
|
|
208
|
+
};
|
|
209
|
+
}, [
|
|
210
|
+
p,
|
|
211
|
+
r,
|
|
212
|
+
d,
|
|
213
|
+
l,
|
|
214
|
+
i,
|
|
215
|
+
t,
|
|
216
|
+
N,
|
|
217
|
+
F,
|
|
218
|
+
y,
|
|
219
|
+
u,
|
|
220
|
+
e,
|
|
221
|
+
L,
|
|
222
|
+
b
|
|
223
|
+
]),
|
|
224
|
+
isMultilineAddressField: y
|
|
225
|
+
};
|
|
226
|
+
}, Ft = /* @__PURE__ */ We(void 0), En = ({ children: e, fields: t }) => {
|
|
227
|
+
const o = w(() => ({
|
|
228
|
+
fields: t
|
|
229
|
+
}), [
|
|
230
|
+
t
|
|
231
|
+
]);
|
|
232
|
+
return /* @__PURE__ */ n.createElement(Ft.Provider, {
|
|
233
|
+
value: o
|
|
234
|
+
}, e);
|
|
235
|
+
};
|
|
236
|
+
function me(e) {
|
|
237
|
+
const t = De(Ft);
|
|
238
|
+
if (!t)
|
|
239
|
+
throw new Error("useAddressFields must be used within AddressFieldsProvider");
|
|
240
|
+
return t.fields[e];
|
|
241
|
+
}
|
|
242
|
+
function be(e) {
|
|
243
|
+
const { t } = qe(), o = Ne(), r = o && at.getCountryByShortKey(o), l = (r ? r.addressPartDisplayNames : at.getDefaultAddressDisplayNames())[e];
|
|
244
|
+
return l ? t(l) : "";
|
|
245
|
+
}
|
|
246
|
+
const re = ({ children: e }) => {
|
|
247
|
+
const { id: t, value: o, onChange: r, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: I } = T(), L = be("addressLine2"), b = E(e, re.Label), p = E(e, re.Input), y = E(e, re.Description), N = E(e, re.Error);
|
|
248
|
+
return /* @__PURE__ */ n.createElement(u, {
|
|
249
|
+
fieldId: t,
|
|
250
|
+
renderLabel: () => h(b, {
|
|
251
|
+
label: L
|
|
252
|
+
}),
|
|
253
|
+
renderInput: () => /* @__PURE__ */ n.createElement(Ce, {
|
|
254
|
+
"aria-labelledby": I,
|
|
255
|
+
value: o ?? "",
|
|
256
|
+
onChange: r,
|
|
257
|
+
isDisabled: a,
|
|
258
|
+
isReadOnly: l,
|
|
259
|
+
isRequired: i,
|
|
260
|
+
isInvalid: s,
|
|
261
|
+
onBlur: d,
|
|
262
|
+
onFocus: m
|
|
263
|
+
}, p),
|
|
264
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, N, y)
|
|
265
|
+
});
|
|
266
|
+
}, bn = ({ className: e }) => {
|
|
267
|
+
const { id: t, placeholder: o } = P(), { inputId: r, ariaDescribedBy: a } = T(), l = B(null);
|
|
268
|
+
return le(() => {
|
|
269
|
+
var i;
|
|
270
|
+
(i = l.current) == null || i.focus();
|
|
271
|
+
}, t), /* @__PURE__ */ n.createElement(ie, {
|
|
272
|
+
ref: l,
|
|
273
|
+
id: r,
|
|
274
|
+
"aria-describedby": a,
|
|
275
|
+
className: e,
|
|
276
|
+
placeholder: o
|
|
277
|
+
});
|
|
278
|
+
};
|
|
279
|
+
re.Label = ue;
|
|
280
|
+
re.Input = bn;
|
|
281
|
+
re.Description = ce;
|
|
282
|
+
re.Error = de;
|
|
283
|
+
const Ke = ({ enabled: e }) => {
|
|
284
|
+
const { actions: t } = Ct(), [o, r] = ye(V()), a = D(() => r(V()), []);
|
|
285
|
+
return w(() => {
|
|
286
|
+
const { predict: l, getPlace: i, searchByPostalCode: s } = t ?? {};
|
|
287
|
+
if (!(!e || !l || !i || !s))
|
|
288
|
+
return {
|
|
289
|
+
predict: (d) => l({
|
|
290
|
+
...d,
|
|
291
|
+
sessionToken: o
|
|
292
|
+
}),
|
|
293
|
+
getPlace: (d) => i({
|
|
294
|
+
...d,
|
|
295
|
+
sessionToken: o,
|
|
296
|
+
refreshSessionToken: a
|
|
297
|
+
}),
|
|
298
|
+
searchByPostalCode: (d) => s({
|
|
299
|
+
...d,
|
|
300
|
+
sessionToken: o
|
|
301
|
+
})
|
|
302
|
+
};
|
|
303
|
+
}, [
|
|
304
|
+
e,
|
|
305
|
+
t,
|
|
306
|
+
o,
|
|
307
|
+
a
|
|
308
|
+
]);
|
|
309
|
+
};
|
|
310
|
+
var we, it;
|
|
311
|
+
function fn() {
|
|
312
|
+
if (it) return we;
|
|
313
|
+
it = 1;
|
|
314
|
+
var e = Gt(), t = function() {
|
|
315
|
+
return e.Date.now();
|
|
316
|
+
};
|
|
317
|
+
return we = t, we;
|
|
318
|
+
}
|
|
319
|
+
var xe, ct;
|
|
320
|
+
function yn() {
|
|
321
|
+
if (ct) return xe;
|
|
322
|
+
ct = 1;
|
|
323
|
+
var e = /\s/;
|
|
324
|
+
function t(o) {
|
|
325
|
+
for (var r = o.length; r-- && e.test(o.charAt(r)); )
|
|
326
|
+
;
|
|
327
|
+
return r;
|
|
328
|
+
}
|
|
329
|
+
return xe = t, xe;
|
|
330
|
+
}
|
|
331
|
+
var Be, dt;
|
|
332
|
+
function Cn() {
|
|
333
|
+
if (dt) return Be;
|
|
334
|
+
dt = 1;
|
|
335
|
+
var e = yn(), t = /^\s+/;
|
|
336
|
+
function o(r) {
|
|
337
|
+
return r && r.slice(0, e(r) + 1).replace(t, "");
|
|
338
|
+
}
|
|
339
|
+
return Be = o, Be;
|
|
340
|
+
}
|
|
341
|
+
var ke, ut;
|
|
342
|
+
function In() {
|
|
343
|
+
if (ut) return ke;
|
|
344
|
+
ut = 1;
|
|
345
|
+
var e = Xt(), t = zt(), o = "[object Symbol]";
|
|
346
|
+
function r(a) {
|
|
347
|
+
return typeof a == "symbol" || t(a) && e(a) == o;
|
|
348
|
+
}
|
|
349
|
+
return ke = r, ke;
|
|
350
|
+
}
|
|
351
|
+
var $e, mt;
|
|
352
|
+
function Ln() {
|
|
353
|
+
if (mt) return $e;
|
|
354
|
+
mt = 1;
|
|
355
|
+
var e = Cn(), t = Ot(), o = In(), r = NaN, a = /^[-+]0x[0-9a-f]+$/i, l = /^0b[01]+$/i, i = /^0o[0-7]+$/i, s = parseInt;
|
|
356
|
+
function d(m) {
|
|
357
|
+
if (typeof m == "number")
|
|
358
|
+
return m;
|
|
359
|
+
if (o(m))
|
|
360
|
+
return r;
|
|
361
|
+
if (t(m)) {
|
|
362
|
+
var u = typeof m.valueOf == "function" ? m.valueOf() : m;
|
|
363
|
+
m = t(u) ? u + "" : u;
|
|
364
|
+
}
|
|
365
|
+
if (typeof m != "string")
|
|
366
|
+
return m === 0 ? m : +m;
|
|
367
|
+
m = e(m);
|
|
368
|
+
var I = l.test(m);
|
|
369
|
+
return I || i.test(m) ? s(m.slice(2), I ? 2 : 8) : a.test(m) ? r : +m;
|
|
370
|
+
}
|
|
371
|
+
return $e = d, $e;
|
|
372
|
+
}
|
|
373
|
+
var Ue, pt;
|
|
374
|
+
function Nn() {
|
|
375
|
+
if (pt) return Ue;
|
|
376
|
+
pt = 1;
|
|
377
|
+
var e = Ot(), t = fn(), o = Ln(), r = "Expected a function", a = Math.max, l = Math.min;
|
|
378
|
+
function i(s, d, m) {
|
|
379
|
+
var u, I, L, b, p, y, N = 0, F = !1, S = !1, g = !0;
|
|
380
|
+
if (typeof s != "function")
|
|
381
|
+
throw new TypeError(r);
|
|
382
|
+
d = o(d) || 0, e(m) && (F = !!m.leading, S = "maxWait" in m, L = S ? a(o(m.maxWait) || 0, d) : L, g = "trailing" in m ? !!m.trailing : g);
|
|
383
|
+
function R(A) {
|
|
384
|
+
var J = u, Ee = I;
|
|
385
|
+
return u = I = void 0, N = A, b = s.apply(Ee, J), b;
|
|
386
|
+
}
|
|
387
|
+
function q(A) {
|
|
388
|
+
return N = A, p = setTimeout(v, d), F ? R(A) : b;
|
|
389
|
+
}
|
|
390
|
+
function _(A) {
|
|
391
|
+
var J = A - y, Ee = A - N, Oe = d - J;
|
|
392
|
+
return S ? l(Oe, L - Ee) : Oe;
|
|
393
|
+
}
|
|
394
|
+
function O(A) {
|
|
395
|
+
var J = A - y, Ee = A - N;
|
|
396
|
+
return y === void 0 || J >= d || J < 0 || S && Ee >= L;
|
|
397
|
+
}
|
|
398
|
+
function v() {
|
|
399
|
+
var A = t();
|
|
400
|
+
if (O(A))
|
|
401
|
+
return pe(A);
|
|
402
|
+
p = setTimeout(v, _(A));
|
|
403
|
+
}
|
|
404
|
+
function pe(A) {
|
|
405
|
+
return p = void 0, g && u ? R(A) : (u = I = void 0, b);
|
|
406
|
+
}
|
|
407
|
+
function x() {
|
|
408
|
+
p !== void 0 && clearTimeout(p), N = 0, u = y = I = p = void 0;
|
|
409
|
+
}
|
|
410
|
+
function M() {
|
|
411
|
+
return p === void 0 ? b : pe(t());
|
|
412
|
+
}
|
|
413
|
+
function j() {
|
|
414
|
+
var A = t(), J = O(A);
|
|
415
|
+
if (u = arguments, I = this, y = A, J) {
|
|
416
|
+
if (p === void 0)
|
|
417
|
+
return q(y);
|
|
418
|
+
if (S)
|
|
419
|
+
return clearTimeout(p), p = setTimeout(v, d), R(y);
|
|
420
|
+
}
|
|
421
|
+
return p === void 0 && (p = setTimeout(v, d)), b;
|
|
422
|
+
}
|
|
423
|
+
return j.cancel = x, j.flush = M, j;
|
|
424
|
+
}
|
|
425
|
+
return Ue = i, Ue;
|
|
426
|
+
}
|
|
427
|
+
var On = Nn();
|
|
428
|
+
const gn = /* @__PURE__ */ wt(On), vn = (e, t, o = 200) => {
|
|
429
|
+
const r = B(e), a = D(gn((...l) => {
|
|
430
|
+
r.current(...l);
|
|
431
|
+
}, o), [
|
|
432
|
+
o
|
|
433
|
+
]);
|
|
434
|
+
return Ve(() => {
|
|
435
|
+
r.current = e;
|
|
436
|
+
}, [
|
|
437
|
+
e,
|
|
438
|
+
t
|
|
439
|
+
]), a;
|
|
440
|
+
}, hn = () => {
|
|
441
|
+
const e = B(!0);
|
|
442
|
+
return Ve(() => () => {
|
|
443
|
+
e.current = !1;
|
|
444
|
+
}, []), () => e.current;
|
|
445
|
+
}, Et = {
|
|
446
|
+
loading: !1,
|
|
447
|
+
predictions: []
|
|
448
|
+
}, St = ({ atlas: e, onError: t }) => {
|
|
449
|
+
const [{ loading: r, predictions: a }, l] = ye(Et), i = B(0), s = hn(), d = D(() => {
|
|
450
|
+
i.current++, l(Et);
|
|
451
|
+
}, []), m = vn(async ({ input: u, countryCodes: I }) => {
|
|
452
|
+
if (!e || !s())
|
|
453
|
+
return;
|
|
454
|
+
if (!u) {
|
|
455
|
+
d();
|
|
456
|
+
return;
|
|
457
|
+
}
|
|
458
|
+
const L = ++i.current;
|
|
459
|
+
l((p) => ({
|
|
460
|
+
...p,
|
|
461
|
+
loading: !0
|
|
462
|
+
}));
|
|
463
|
+
let b;
|
|
464
|
+
try {
|
|
465
|
+
b = await e.predict({
|
|
466
|
+
input: u,
|
|
467
|
+
countryCodes: I
|
|
468
|
+
});
|
|
469
|
+
} catch (p) {
|
|
470
|
+
t ? t(p) : console.error(p);
|
|
471
|
+
} finally {
|
|
472
|
+
const p = L === i.current;
|
|
473
|
+
s() && p && l((y) => ({
|
|
474
|
+
loading: !1,
|
|
475
|
+
// set new predictions if fetched properly, else keep current predictions
|
|
476
|
+
predictions: b || y.predictions
|
|
477
|
+
}));
|
|
478
|
+
}
|
|
479
|
+
}, [
|
|
480
|
+
e,
|
|
481
|
+
t
|
|
482
|
+
], 200);
|
|
483
|
+
return {
|
|
484
|
+
predictions: a,
|
|
485
|
+
loading: r,
|
|
486
|
+
updatePredictions: m,
|
|
487
|
+
clearPredictions: d
|
|
488
|
+
};
|
|
489
|
+
}, Ye = ({ optionCount: e }) => {
|
|
490
|
+
const t = De(It), o = B(t);
|
|
491
|
+
o.current = t;
|
|
492
|
+
const r = B(e);
|
|
493
|
+
return Ve(() => {
|
|
494
|
+
const a = e > 0 && r.current === 0;
|
|
495
|
+
r.current = e;
|
|
496
|
+
const l = o.current;
|
|
497
|
+
a && (l != null && l.isFocused) && !l.isOpen && l.open(null, "manual");
|
|
498
|
+
}, [
|
|
499
|
+
e
|
|
500
|
+
]), null;
|
|
501
|
+
}, k = ({ children: e }) => {
|
|
502
|
+
const { id: t, value: o, onChange: r, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: I } = P(), { labelId: L } = T(), { autocompleteEnabled: b } = Le(), p = I || b, y = be("addressLine1"), N = E(e, k.Label), F = E(e, k.Input), S = E(e, k.Options), g = E(e, k.Description), R = E(e, k.Error);
|
|
503
|
+
return p ? /* @__PURE__ */ n.createElement(u, {
|
|
504
|
+
fieldId: t,
|
|
505
|
+
renderLabel: () => h(N, {
|
|
506
|
+
label: y
|
|
507
|
+
}),
|
|
508
|
+
renderInput: () => /* @__PURE__ */ n.createElement(Fn, {
|
|
509
|
+
value: o,
|
|
510
|
+
onChange: r,
|
|
511
|
+
disabled: a,
|
|
512
|
+
readOnly: l,
|
|
513
|
+
required: i,
|
|
514
|
+
hasError: s,
|
|
515
|
+
onBlur: d,
|
|
516
|
+
onFocus: m
|
|
517
|
+
}, F, S),
|
|
518
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R, g)
|
|
519
|
+
}) : /* @__PURE__ */ n.createElement(u, {
|
|
520
|
+
fieldId: t,
|
|
521
|
+
renderLabel: () => h(N, {
|
|
522
|
+
label: y
|
|
523
|
+
}),
|
|
524
|
+
renderInput: () => /* @__PURE__ */ n.createElement(Ce, {
|
|
525
|
+
"aria-labelledby": L,
|
|
526
|
+
value: o ?? "",
|
|
527
|
+
onChange: r,
|
|
528
|
+
isDisabled: a,
|
|
529
|
+
isReadOnly: l,
|
|
530
|
+
isRequired: i,
|
|
531
|
+
isInvalid: s,
|
|
532
|
+
onBlur: d,
|
|
533
|
+
onFocus: m
|
|
534
|
+
}, F),
|
|
535
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R, g)
|
|
536
|
+
});
|
|
537
|
+
}, Fn = ({ children: e, value: t, onChange: o, disabled: r, readOnly: a, required: l, hasError: i, onBlur: s, onFocus: d }) => {
|
|
538
|
+
const { labelId: m } = T(), { onAddressSelect: u } = Le(), I = Ne(), L = Ke({
|
|
539
|
+
enabled: !0
|
|
540
|
+
}), { predictions: b, updatePredictions: p, clearPredictions: y } = St({
|
|
541
|
+
atlas: L
|
|
542
|
+
}), N = w(() => b.map((O) => ({
|
|
543
|
+
id: O.searchId || "",
|
|
544
|
+
label: O.description || ""
|
|
545
|
+
})), [
|
|
546
|
+
b
|
|
547
|
+
]), F = D((O) => {
|
|
548
|
+
p({
|
|
549
|
+
input: O,
|
|
550
|
+
countryCodes: I ? [
|
|
551
|
+
I
|
|
552
|
+
] : void 0
|
|
553
|
+
}), o(O);
|
|
554
|
+
}, [
|
|
555
|
+
o,
|
|
556
|
+
p,
|
|
557
|
+
I
|
|
558
|
+
]), S = D(async (O) => {
|
|
559
|
+
if (!O)
|
|
560
|
+
return;
|
|
561
|
+
y();
|
|
562
|
+
const v = await (L == null ? void 0 : L.getPlace({
|
|
563
|
+
searchId: String(O)
|
|
564
|
+
}));
|
|
565
|
+
v && u && u(v);
|
|
566
|
+
}, [
|
|
567
|
+
u,
|
|
568
|
+
y,
|
|
569
|
+
L
|
|
570
|
+
]), g = D(() => {
|
|
571
|
+
y(), s == null || s();
|
|
572
|
+
}, [
|
|
573
|
+
s,
|
|
574
|
+
y
|
|
575
|
+
]), R = D(() => {
|
|
576
|
+
d == null || d();
|
|
577
|
+
}, [
|
|
578
|
+
d
|
|
579
|
+
]), q = E(e, k.Input), _ = E(e, k.Options);
|
|
580
|
+
return /* @__PURE__ */ n.createElement(Re, {
|
|
581
|
+
"aria-labelledby": m,
|
|
582
|
+
inputValue: t ?? "",
|
|
583
|
+
onInputChange: F,
|
|
584
|
+
value: null,
|
|
585
|
+
onChange: S,
|
|
586
|
+
isDisabled: r,
|
|
587
|
+
isReadOnly: a,
|
|
588
|
+
isRequired: l,
|
|
589
|
+
isInvalid: i,
|
|
590
|
+
onBlur: g,
|
|
591
|
+
onFocus: R,
|
|
592
|
+
allowsCustomValue: !0,
|
|
593
|
+
menuTrigger: "input",
|
|
594
|
+
items: N
|
|
595
|
+
}, h(q, {
|
|
596
|
+
onFocus: R
|
|
597
|
+
}), h(_, {
|
|
598
|
+
options: N
|
|
599
|
+
}), /* @__PURE__ */ n.createElement(Ye, {
|
|
600
|
+
optionCount: N.length
|
|
601
|
+
}));
|
|
602
|
+
}, Sn = ({ className: e, ...t }) => {
|
|
603
|
+
const { id: o, placeholder: r } = P(), { inputId: a, ariaDescribedBy: l } = T(), { onFocus: i } = t, s = B(null);
|
|
604
|
+
return le(() => {
|
|
605
|
+
var d;
|
|
606
|
+
(d = s.current) == null || d.focus();
|
|
607
|
+
}, o), /* @__PURE__ */ n.createElement(ie, {
|
|
608
|
+
ref: s,
|
|
609
|
+
id: a,
|
|
610
|
+
"aria-describedby": l,
|
|
611
|
+
className: e,
|
|
612
|
+
placeholder: r,
|
|
613
|
+
onFocus: i
|
|
614
|
+
});
|
|
615
|
+
}, He = ({ children: e, className: t }) => {
|
|
616
|
+
const o = E(e, He.Option);
|
|
617
|
+
return /* @__PURE__ */ n.createElement(Ae, {
|
|
618
|
+
className: t,
|
|
619
|
+
containerPadding: 0,
|
|
620
|
+
offset: 0
|
|
621
|
+
}, /* @__PURE__ */ n.createElement(_e, {
|
|
622
|
+
renderEmptyState: () => null
|
|
623
|
+
}, (r) => h(o, {
|
|
624
|
+
id: r.id,
|
|
625
|
+
label: r.label
|
|
626
|
+
})));
|
|
627
|
+
}, Dn = ({ className: e, ...t }) => {
|
|
628
|
+
const { id: o, label: r } = t;
|
|
629
|
+
return /* @__PURE__ */ n.createElement(Pe, {
|
|
630
|
+
className: e,
|
|
631
|
+
id: o,
|
|
632
|
+
textValue: r
|
|
633
|
+
}, r);
|
|
634
|
+
};
|
|
635
|
+
He.Option = Dn;
|
|
636
|
+
k.Label = ue;
|
|
637
|
+
k.Input = Sn;
|
|
638
|
+
k.Options = He;
|
|
639
|
+
k.Description = ce;
|
|
640
|
+
k.Error = de;
|
|
641
|
+
const oe = ({ children: e }) => {
|
|
642
|
+
const { id: t, value: o, onChange: r, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: I } = T(), { t: L } = qe(), b = L("field.mla-apartment.label"), p = E(e, oe.Label), y = E(e, oe.Input), N = E(e, oe.Description), F = E(e, oe.Error);
|
|
643
|
+
return /* @__PURE__ */ n.createElement(u, {
|
|
644
|
+
fieldId: t,
|
|
645
|
+
renderLabel: () => h(p, {
|
|
646
|
+
label: b
|
|
647
|
+
}),
|
|
648
|
+
renderInput: () => /* @__PURE__ */ n.createElement(Ce, {
|
|
649
|
+
"aria-labelledby": I,
|
|
650
|
+
value: o ?? "",
|
|
651
|
+
onChange: r,
|
|
652
|
+
isDisabled: a,
|
|
653
|
+
isReadOnly: l,
|
|
654
|
+
isRequired: i,
|
|
655
|
+
isInvalid: s,
|
|
656
|
+
onBlur: d,
|
|
657
|
+
onFocus: m
|
|
658
|
+
}, y),
|
|
659
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, F, N)
|
|
660
|
+
});
|
|
661
|
+
}, Rn = ({ className: e }) => {
|
|
662
|
+
const { id: t, placeholder: o } = P(), { inputId: r, ariaDescribedBy: a } = T(), l = B(null);
|
|
663
|
+
return le(() => {
|
|
664
|
+
var i;
|
|
665
|
+
(i = l.current) == null || i.focus();
|
|
666
|
+
}, t), /* @__PURE__ */ n.createElement(ie, {
|
|
667
|
+
ref: l,
|
|
668
|
+
id: r,
|
|
669
|
+
"aria-describedby": a,
|
|
670
|
+
className: e,
|
|
671
|
+
placeholder: o
|
|
672
|
+
});
|
|
673
|
+
};
|
|
674
|
+
oe.Label = ue;
|
|
675
|
+
oe.Input = Rn;
|
|
676
|
+
oe.Description = ce;
|
|
677
|
+
oe.Error = de;
|
|
678
|
+
const se = ({ children: e }) => {
|
|
679
|
+
const { id: t, value: o, onChange: r, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: I } = T(), L = be("city"), b = E(e, se.Label), p = E(e, se.Input), y = E(e, se.Description), N = E(e, se.Error);
|
|
680
|
+
return /* @__PURE__ */ n.createElement(u, {
|
|
681
|
+
fieldId: t,
|
|
682
|
+
renderLabel: () => h(b, {
|
|
683
|
+
label: L
|
|
684
|
+
}),
|
|
685
|
+
renderInput: () => /* @__PURE__ */ n.createElement(Ce, {
|
|
686
|
+
"aria-labelledby": I,
|
|
687
|
+
value: o ?? "",
|
|
688
|
+
onChange: r,
|
|
689
|
+
isDisabled: a,
|
|
690
|
+
isReadOnly: l,
|
|
691
|
+
isRequired: i,
|
|
692
|
+
isInvalid: s,
|
|
693
|
+
onBlur: d,
|
|
694
|
+
onFocus: m
|
|
695
|
+
}, p),
|
|
696
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, N, y)
|
|
697
|
+
});
|
|
698
|
+
}, An = ({ className: e }) => {
|
|
699
|
+
const { id: t, placeholder: o } = P(), { inputId: r, ariaDescribedBy: a } = T(), l = B(null);
|
|
700
|
+
return le(() => {
|
|
701
|
+
var i;
|
|
702
|
+
(i = l.current) == null || i.focus();
|
|
703
|
+
}, t), /* @__PURE__ */ n.createElement(ie, {
|
|
704
|
+
ref: l,
|
|
705
|
+
id: r,
|
|
706
|
+
"aria-describedby": a,
|
|
707
|
+
className: e,
|
|
708
|
+
placeholder: o
|
|
709
|
+
});
|
|
710
|
+
};
|
|
711
|
+
se.Label = ue;
|
|
712
|
+
se.Input = An;
|
|
713
|
+
se.Description = ce;
|
|
714
|
+
se.Error = de;
|
|
715
|
+
const Dt = ({ readOnly: e, disabled: t } = {}) => {
|
|
716
|
+
const o = De(It);
|
|
717
|
+
return D(() => {
|
|
718
|
+
!o || o.isOpen || e || t || o.open(null, "manual");
|
|
719
|
+
}, [
|
|
720
|
+
o,
|
|
721
|
+
e,
|
|
722
|
+
t
|
|
723
|
+
]);
|
|
724
|
+
}, _n = (e, t) => e.find((o) => o.label.toLocaleLowerCase() === t.toLocaleLowerCase().trim()), Rt = ({ options: e, value: t, commit: o, clear: r, onBlur: a }) => {
|
|
725
|
+
const [l, i] = ye(null), s = Qt(a), d = w(() => {
|
|
726
|
+
var b;
|
|
727
|
+
return t ? ((b = e.find((p) => p.value === t)) == null ? void 0 : b.label) ?? "" : "";
|
|
728
|
+
}, [
|
|
729
|
+
t,
|
|
730
|
+
e
|
|
731
|
+
]), m = D((b) => {
|
|
732
|
+
typeof b != "string" || b === "" || b === t || (i(null), o(b));
|
|
733
|
+
}, [
|
|
734
|
+
o,
|
|
735
|
+
t
|
|
736
|
+
]), u = D((b) => {
|
|
737
|
+
if (i(b), b === "")
|
|
738
|
+
return;
|
|
739
|
+
const p = _n(e, b);
|
|
740
|
+
p && p.value !== t && o(p.value);
|
|
741
|
+
}, [
|
|
742
|
+
o,
|
|
743
|
+
e,
|
|
744
|
+
t
|
|
745
|
+
]), I = D((b) => {
|
|
746
|
+
b.key !== "Enter" && b.key !== "Escape" || (i(null), b.key === "Enter" && l === "" && t && r());
|
|
747
|
+
}, [
|
|
748
|
+
l,
|
|
749
|
+
t,
|
|
750
|
+
r
|
|
751
|
+
]), L = D(() => {
|
|
752
|
+
l === "" && t && r(), i(null), s();
|
|
753
|
+
}, [
|
|
754
|
+
l,
|
|
755
|
+
t,
|
|
756
|
+
r,
|
|
757
|
+
s
|
|
758
|
+
]);
|
|
759
|
+
return {
|
|
760
|
+
value: t ?? null,
|
|
761
|
+
inputValue: l ?? d,
|
|
762
|
+
onChange: m,
|
|
763
|
+
onInputChange: u,
|
|
764
|
+
onBlur: L,
|
|
765
|
+
onInputKeyDown: I
|
|
766
|
+
};
|
|
767
|
+
}, Y = ({ children: e }) => {
|
|
768
|
+
const { id: t, value: o, onChange: r, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, options: I } = P(), { labelId: L } = T(), { t: b } = qe(), { language: p } = yt(), y = w(() => (I || []).reduce((x, M) => (M.value && he.hasOwnProperty(M.value) && x.push({
|
|
769
|
+
value: M.value,
|
|
770
|
+
label: b(`locale-dataset.countries.${he[M.value].toUpperCase()}`)
|
|
771
|
+
}), x), []).sort((x, M) => x.label.localeCompare(M.label, p)), [
|
|
772
|
+
I,
|
|
773
|
+
b,
|
|
774
|
+
p
|
|
775
|
+
]), N = D((x) => r(x), [
|
|
776
|
+
r
|
|
777
|
+
]), F = D(() => N(""), [
|
|
778
|
+
N
|
|
779
|
+
]), { onInputKeyDown: S, ...g } = Rt({
|
|
780
|
+
options: y,
|
|
781
|
+
value: o,
|
|
782
|
+
commit: N,
|
|
783
|
+
clear: F,
|
|
784
|
+
onBlur: d
|
|
785
|
+
}), R = be("country"), q = E(e, Y.Label), _ = E(e, Y.Control), O = E(e, Y.Options), v = E(e, Y.Description), pe = E(e, Y.Error);
|
|
786
|
+
return /* @__PURE__ */ n.createElement(u, {
|
|
787
|
+
fieldId: t,
|
|
788
|
+
renderLabel: () => h(q, {
|
|
789
|
+
label: R
|
|
790
|
+
}),
|
|
791
|
+
renderInput: () => /* @__PURE__ */ n.createElement(Re, {
|
|
792
|
+
"aria-labelledby": L,
|
|
793
|
+
...g,
|
|
794
|
+
isDisabled: a,
|
|
795
|
+
isReadOnly: l,
|
|
796
|
+
isRequired: i,
|
|
797
|
+
isInvalid: s,
|
|
798
|
+
onFocus: m,
|
|
799
|
+
menuTrigger: "input"
|
|
800
|
+
}, h(_, {
|
|
801
|
+
onKeyDown: S
|
|
802
|
+
}), h(O, {
|
|
803
|
+
options: y
|
|
804
|
+
})),
|
|
805
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, pe, v)
|
|
806
|
+
});
|
|
807
|
+
}, Fe = ({ children: e, className: t, ...o }) => {
|
|
808
|
+
const { disabled: r, hasError: a } = P(), { onKeyDown: l } = o, i = E(e, Fe.Input), s = E(e, Fe.Trigger);
|
|
809
|
+
return /* @__PURE__ */ n.createElement(Lt, {
|
|
810
|
+
className: t,
|
|
811
|
+
isDisabled: r,
|
|
812
|
+
isInvalid: a
|
|
813
|
+
}, h(i, {
|
|
814
|
+
onKeyDown: l
|
|
815
|
+
}), s);
|
|
816
|
+
}, Pn = ({ className: e, ...t }) => {
|
|
817
|
+
const { id: o, placeholder: r, readOnly: a, disabled: l } = P(), { inputId: i, ariaDescribedBy: s } = T(), { onKeyDown: d } = t, m = B(null), u = Dt({
|
|
818
|
+
readOnly: a,
|
|
819
|
+
disabled: l
|
|
820
|
+
});
|
|
821
|
+
return le(() => {
|
|
822
|
+
var I;
|
|
823
|
+
(I = m.current) == null || I.focus();
|
|
824
|
+
}, o), /* @__PURE__ */ n.createElement(ie, {
|
|
825
|
+
ref: m,
|
|
826
|
+
id: i,
|
|
827
|
+
"aria-describedby": s,
|
|
828
|
+
className: e,
|
|
829
|
+
placeholder: r,
|
|
830
|
+
onClick: u,
|
|
831
|
+
onKeyDown: d
|
|
832
|
+
});
|
|
833
|
+
}, Tn = ({ children: e, className: t }) => /* @__PURE__ */ n.createElement(Nt, {
|
|
834
|
+
className: t
|
|
835
|
+
}, e);
|
|
836
|
+
Fe.Input = Pn;
|
|
837
|
+
Fe.Trigger = Tn;
|
|
838
|
+
const je = ({ children: e, className: t, ...o }) => {
|
|
839
|
+
const { options: r } = o, a = E(e, je.Option);
|
|
840
|
+
return /* @__PURE__ */ n.createElement(Ae, {
|
|
841
|
+
className: t,
|
|
842
|
+
containerPadding: 0,
|
|
843
|
+
offset: 0
|
|
844
|
+
}, /* @__PURE__ */ n.createElement(_e, null, r.map((l) => h(a, {
|
|
845
|
+
key: l.value,
|
|
846
|
+
value: l.value,
|
|
847
|
+
label: l.label
|
|
848
|
+
}))));
|
|
849
|
+
}, qn = ({ className: e, ...t }) => {
|
|
850
|
+
const { value: o, label: r } = t;
|
|
851
|
+
return /* @__PURE__ */ n.createElement(Pe, {
|
|
852
|
+
className: e,
|
|
853
|
+
id: o,
|
|
854
|
+
textValue: r
|
|
855
|
+
}, r);
|
|
856
|
+
};
|
|
857
|
+
je.Option = qn;
|
|
858
|
+
Y.Label = ue;
|
|
859
|
+
Y.Control = Fe;
|
|
860
|
+
Y.Options = je;
|
|
861
|
+
Y.Description = ce;
|
|
862
|
+
Y.Error = de;
|
|
863
|
+
const Mn = /(\d{7})|(\d{3}-\d{4})/;
|
|
864
|
+
function wn(e) {
|
|
865
|
+
var t;
|
|
866
|
+
return (t = e.match(Mn)) == null ? void 0 : t[0];
|
|
867
|
+
}
|
|
868
|
+
function xn({ isAutocompleteEnabled: e }) {
|
|
869
|
+
const t = B({
|
|
870
|
+
hasAddress: !1
|
|
871
|
+
}), o = Ke({
|
|
872
|
+
enabled: e
|
|
873
|
+
});
|
|
874
|
+
return {
|
|
875
|
+
searchByPostalCode: D(async (a) => {
|
|
876
|
+
const l = wn(a);
|
|
877
|
+
if (l) {
|
|
878
|
+
if (t.current.postalCode === l && t.current.hasAddress)
|
|
879
|
+
return t.current.address;
|
|
880
|
+
t.current = {
|
|
881
|
+
postalCode: l,
|
|
882
|
+
address: void 0,
|
|
883
|
+
hasAddress: !1
|
|
884
|
+
};
|
|
885
|
+
try {
|
|
886
|
+
const i = await (o == null ? void 0 : o.searchByPostalCode({
|
|
887
|
+
countryCode: "JP",
|
|
888
|
+
postalCode: l
|
|
889
|
+
}));
|
|
890
|
+
return t.current.hasAddress = !0, t.current.address = void 0, i != null && i.formattedAddress ? (t.current.address = i, i) : void 0;
|
|
891
|
+
} catch (i) {
|
|
892
|
+
console.error(i);
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
}, [
|
|
896
|
+
o
|
|
897
|
+
])
|
|
898
|
+
};
|
|
899
|
+
}
|
|
900
|
+
const $ = ({ children: e }) => {
|
|
901
|
+
const { id: t, value: o, onChange: r, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: I } = P(), { labelId: L } = T(), b = Ne(), { autocompleteEnabled: p } = Le(), y = !!(b && he[b] === he.JP), N = (I || p) && y, F = be("zipCode"), S = E(e, $.Label), g = E(e, $.Control), R = E(e, $.Options), q = E(e, $.Description), _ = E(e, $.Error);
|
|
902
|
+
return N ? /* @__PURE__ */ n.createElement(u, {
|
|
903
|
+
fieldId: t,
|
|
904
|
+
renderLabel: () => h(S, {
|
|
905
|
+
label: F
|
|
906
|
+
}),
|
|
907
|
+
renderInput: () => /* @__PURE__ */ n.createElement(Bn, {
|
|
908
|
+
value: o,
|
|
909
|
+
onChange: r,
|
|
910
|
+
disabled: a,
|
|
911
|
+
readOnly: l,
|
|
912
|
+
required: i,
|
|
913
|
+
hasError: s,
|
|
914
|
+
onBlur: d,
|
|
915
|
+
onFocus: m
|
|
916
|
+
}, g, R),
|
|
917
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, _, q)
|
|
918
|
+
}) : /* @__PURE__ */ n.createElement(u, {
|
|
919
|
+
fieldId: t,
|
|
920
|
+
renderLabel: () => h(S, {
|
|
921
|
+
label: F
|
|
922
|
+
}),
|
|
923
|
+
renderInput: () => /* @__PURE__ */ n.createElement(Ce, {
|
|
924
|
+
"aria-labelledby": L,
|
|
925
|
+
value: o ?? "",
|
|
926
|
+
onChange: r,
|
|
927
|
+
isDisabled: a,
|
|
928
|
+
isReadOnly: l,
|
|
929
|
+
isRequired: i,
|
|
930
|
+
isInvalid: s,
|
|
931
|
+
onBlur: d,
|
|
932
|
+
onFocus: m
|
|
933
|
+
}, g),
|
|
934
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, _, q)
|
|
935
|
+
});
|
|
936
|
+
}, Bn = ({ children: e, value: t, onChange: o, disabled: r, readOnly: a, required: l, hasError: i, onBlur: s, onFocus: d }) => {
|
|
937
|
+
const { labelId: m } = T(), { onAddressSelect: u } = Le(), [I, L] = ye(!1), { searchByPostalCode: b } = xn({
|
|
938
|
+
isAutocompleteEnabled: I
|
|
939
|
+
}), [p, y] = ye(), N = w(() => p ? [
|
|
940
|
+
{
|
|
941
|
+
id: V(),
|
|
942
|
+
label: p.formattedAddress || ""
|
|
943
|
+
}
|
|
944
|
+
] : [], [
|
|
945
|
+
p
|
|
946
|
+
]), F = D(async (O) => {
|
|
947
|
+
o(O);
|
|
948
|
+
const v = await b(O ?? "");
|
|
949
|
+
y(v);
|
|
950
|
+
}, [
|
|
951
|
+
o,
|
|
952
|
+
b
|
|
953
|
+
]), S = D(async (O) => {
|
|
954
|
+
O && (y(void 0), p && u && u(p));
|
|
955
|
+
}, [
|
|
956
|
+
u,
|
|
957
|
+
p
|
|
958
|
+
]), g = D(() => {
|
|
959
|
+
y(void 0), s == null || s();
|
|
960
|
+
}, [
|
|
961
|
+
s
|
|
962
|
+
]), R = D(() => {
|
|
963
|
+
L(!0), d == null || d();
|
|
964
|
+
}, [
|
|
965
|
+
d
|
|
966
|
+
]), q = E(e, $.Control), _ = E(e, $.Options);
|
|
967
|
+
return /* @__PURE__ */ n.createElement(Re, {
|
|
968
|
+
"aria-labelledby": m,
|
|
969
|
+
inputValue: t ?? "",
|
|
970
|
+
onInputChange: F,
|
|
971
|
+
value: null,
|
|
972
|
+
onChange: S,
|
|
973
|
+
isDisabled: r,
|
|
974
|
+
isReadOnly: a,
|
|
975
|
+
isRequired: l,
|
|
976
|
+
isInvalid: i,
|
|
977
|
+
onBlur: g,
|
|
978
|
+
onFocus: R,
|
|
979
|
+
allowsCustomValue: !0,
|
|
980
|
+
menuTrigger: "input",
|
|
981
|
+
items: N
|
|
982
|
+
}, h(q, {
|
|
983
|
+
onFocus: R
|
|
984
|
+
}), h(_, {
|
|
985
|
+
options: N
|
|
986
|
+
}), /* @__PURE__ */ n.createElement(Ye, {
|
|
987
|
+
optionCount: N.length
|
|
988
|
+
}));
|
|
989
|
+
}, Je = ({ children: e, className: t, ...o }) => {
|
|
990
|
+
const { disabled: r, hasError: a } = P(), { onFocus: l } = o, i = Ne(), s = E(e, Je.Input);
|
|
991
|
+
return /* @__PURE__ */ n.createElement("div", {
|
|
992
|
+
className: t,
|
|
993
|
+
"data-country": i || void 0,
|
|
994
|
+
"data-disabled": r || void 0,
|
|
995
|
+
"data-invalid": a || void 0
|
|
996
|
+
}, h(s, {
|
|
997
|
+
onFocus: l
|
|
998
|
+
}));
|
|
999
|
+
}, kn = ({ className: e, ...t }) => {
|
|
1000
|
+
const { id: o, placeholder: r } = P(), { inputId: a, ariaDescribedBy: l } = T(), { onFocus: i } = t, s = B(null);
|
|
1001
|
+
return le(() => {
|
|
1002
|
+
var d;
|
|
1003
|
+
(d = s.current) == null || d.focus();
|
|
1004
|
+
}, o), /* @__PURE__ */ n.createElement(ie, {
|
|
1005
|
+
ref: s,
|
|
1006
|
+
id: a,
|
|
1007
|
+
"aria-describedby": l,
|
|
1008
|
+
className: e,
|
|
1009
|
+
placeholder: r,
|
|
1010
|
+
onFocus: i
|
|
1011
|
+
});
|
|
1012
|
+
}, Ge = ({ children: e, className: t }) => {
|
|
1013
|
+
const o = E(e, Ge.Option);
|
|
1014
|
+
return /* @__PURE__ */ n.createElement(Ae, {
|
|
1015
|
+
className: t,
|
|
1016
|
+
containerPadding: 0,
|
|
1017
|
+
offset: 0
|
|
1018
|
+
}, /* @__PURE__ */ n.createElement(_e, {
|
|
1019
|
+
renderEmptyState: () => null
|
|
1020
|
+
}, (r) => h(o, {
|
|
1021
|
+
id: r.id,
|
|
1022
|
+
label: r.label
|
|
1023
|
+
})));
|
|
1024
|
+
}, $n = ({ className: e, ...t }) => {
|
|
1025
|
+
const { id: o, label: r } = t;
|
|
1026
|
+
return /* @__PURE__ */ n.createElement(Pe, {
|
|
1027
|
+
className: e,
|
|
1028
|
+
id: o,
|
|
1029
|
+
textValue: r
|
|
1030
|
+
}, r);
|
|
1031
|
+
};
|
|
1032
|
+
Ge.Option = $n;
|
|
1033
|
+
Je.Input = kn;
|
|
1034
|
+
$.Label = ue;
|
|
1035
|
+
$.Control = Je;
|
|
1036
|
+
$.Options = Ge;
|
|
1037
|
+
$.Description = ce;
|
|
1038
|
+
$.Error = de;
|
|
1039
|
+
const U = ({ children: e }) => {
|
|
1040
|
+
const { id: t, value: o, onChange: r, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: I } = P(), { labelId: L } = T(), { autocompleteEnabled: b } = Le(), p = I || b, y = be("streetName"), N = E(e, U.Label), F = E(e, U.Input), S = E(e, U.Options), g = E(e, U.Description), R = E(e, U.Error);
|
|
1041
|
+
return p ? /* @__PURE__ */ n.createElement(u, {
|
|
1042
|
+
fieldId: t,
|
|
1043
|
+
renderLabel: () => h(N, {
|
|
1044
|
+
label: y
|
|
1045
|
+
}),
|
|
1046
|
+
renderInput: () => /* @__PURE__ */ n.createElement(Un, {
|
|
1047
|
+
value: o,
|
|
1048
|
+
onChange: r,
|
|
1049
|
+
disabled: a,
|
|
1050
|
+
readOnly: l,
|
|
1051
|
+
required: i,
|
|
1052
|
+
hasError: s,
|
|
1053
|
+
onBlur: d,
|
|
1054
|
+
onFocus: m
|
|
1055
|
+
}, F, S),
|
|
1056
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R, g)
|
|
1057
|
+
}) : /* @__PURE__ */ n.createElement(u, {
|
|
1058
|
+
fieldId: t,
|
|
1059
|
+
renderLabel: () => h(N, {
|
|
1060
|
+
label: y
|
|
1061
|
+
}),
|
|
1062
|
+
renderInput: () => /* @__PURE__ */ n.createElement(Ce, {
|
|
1063
|
+
"aria-labelledby": L,
|
|
1064
|
+
value: o ?? "",
|
|
1065
|
+
onChange: r,
|
|
1066
|
+
isDisabled: a,
|
|
1067
|
+
isReadOnly: l,
|
|
1068
|
+
isRequired: i,
|
|
1069
|
+
isInvalid: s,
|
|
1070
|
+
onBlur: d,
|
|
1071
|
+
onFocus: m
|
|
1072
|
+
}, F),
|
|
1073
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R, g)
|
|
1074
|
+
});
|
|
1075
|
+
}, Un = ({ children: e, value: t, onChange: o, disabled: r, readOnly: a, required: l, hasError: i, onBlur: s, onFocus: d }) => {
|
|
1076
|
+
const { labelId: m } = T(), { onAddressSelect: u } = Le(), I = Ne(), L = Ke({
|
|
1077
|
+
enabled: !0
|
|
1078
|
+
}), { predictions: b, updatePredictions: p, clearPredictions: y } = St({
|
|
1079
|
+
atlas: L
|
|
1080
|
+
}), N = E(e, U.Input), F = E(e, U.Options), S = w(() => b.reduce((O, v) => (v.searchId && v.description && O.push({
|
|
1081
|
+
id: v.searchId,
|
|
1082
|
+
label: v.description
|
|
1083
|
+
}), O), []), [
|
|
1084
|
+
b
|
|
1085
|
+
]), g = D((O) => {
|
|
1086
|
+
p({
|
|
1087
|
+
input: O,
|
|
1088
|
+
countryCodes: I ? [
|
|
1089
|
+
I
|
|
1090
|
+
] : void 0
|
|
1091
|
+
}), o(O);
|
|
1092
|
+
}, [
|
|
1093
|
+
o,
|
|
1094
|
+
p,
|
|
1095
|
+
I
|
|
1096
|
+
]), R = D(async (O) => {
|
|
1097
|
+
if (y(), !O)
|
|
1098
|
+
return;
|
|
1099
|
+
const v = await (L == null ? void 0 : L.getPlace({
|
|
1100
|
+
searchId: String(O)
|
|
1101
|
+
}));
|
|
1102
|
+
v && u && u(v);
|
|
1103
|
+
}, [
|
|
1104
|
+
u,
|
|
1105
|
+
y,
|
|
1106
|
+
L
|
|
1107
|
+
]), q = D(() => {
|
|
1108
|
+
y(), s == null || s();
|
|
1109
|
+
}, [
|
|
1110
|
+
s,
|
|
1111
|
+
y
|
|
1112
|
+
]), _ = D(() => {
|
|
1113
|
+
d == null || d();
|
|
1114
|
+
}, [
|
|
1115
|
+
d
|
|
1116
|
+
]);
|
|
1117
|
+
return /* @__PURE__ */ n.createElement(Re, {
|
|
1118
|
+
"aria-labelledby": m,
|
|
1119
|
+
inputValue: t ?? "",
|
|
1120
|
+
onInputChange: g,
|
|
1121
|
+
value: null,
|
|
1122
|
+
onChange: R,
|
|
1123
|
+
isDisabled: r,
|
|
1124
|
+
isReadOnly: a,
|
|
1125
|
+
isRequired: l,
|
|
1126
|
+
isInvalid: i,
|
|
1127
|
+
onBlur: q,
|
|
1128
|
+
onFocus: _,
|
|
1129
|
+
allowsCustomValue: !0,
|
|
1130
|
+
menuTrigger: "input",
|
|
1131
|
+
items: S
|
|
1132
|
+
}, h(N, {
|
|
1133
|
+
onFocus: _
|
|
1134
|
+
}), h(F, {
|
|
1135
|
+
options: S
|
|
1136
|
+
}), /* @__PURE__ */ n.createElement(Ye, {
|
|
1137
|
+
optionCount: S.length
|
|
1138
|
+
}));
|
|
1139
|
+
}, Wn = ({ className: e, ...t }) => {
|
|
1140
|
+
const { id: o, placeholder: r } = P(), { inputId: a, ariaDescribedBy: l } = T(), { onFocus: i } = t, s = B(null);
|
|
1141
|
+
return le(() => {
|
|
1142
|
+
var d;
|
|
1143
|
+
(d = s.current) == null || d.focus();
|
|
1144
|
+
}, o), /* @__PURE__ */ n.createElement(ie, {
|
|
1145
|
+
ref: s,
|
|
1146
|
+
id: a,
|
|
1147
|
+
"aria-describedby": l,
|
|
1148
|
+
className: e,
|
|
1149
|
+
placeholder: r,
|
|
1150
|
+
onFocus: i
|
|
1151
|
+
});
|
|
1152
|
+
}, Xe = ({ children: e, className: t }) => {
|
|
1153
|
+
const o = E(e, Xe.Option);
|
|
1154
|
+
return /* @__PURE__ */ n.createElement(Ae, {
|
|
1155
|
+
className: t,
|
|
1156
|
+
containerPadding: 0,
|
|
1157
|
+
offset: 0
|
|
1158
|
+
}, /* @__PURE__ */ n.createElement(_e, {
|
|
1159
|
+
renderEmptyState: () => null
|
|
1160
|
+
}, (r) => h(o, {
|
|
1161
|
+
id: r.id,
|
|
1162
|
+
label: r.label
|
|
1163
|
+
})));
|
|
1164
|
+
}, Vn = ({ className: e, ...t }) => {
|
|
1165
|
+
const { id: o, label: r } = t;
|
|
1166
|
+
return /* @__PURE__ */ n.createElement(Pe, {
|
|
1167
|
+
className: e,
|
|
1168
|
+
id: o,
|
|
1169
|
+
textValue: r
|
|
1170
|
+
}, r);
|
|
1171
|
+
};
|
|
1172
|
+
Xe.Option = Vn;
|
|
1173
|
+
U.Label = ue;
|
|
1174
|
+
U.Input = Wn;
|
|
1175
|
+
U.Options = Xe;
|
|
1176
|
+
U.Description = ce;
|
|
1177
|
+
U.Error = de;
|
|
1178
|
+
const ae = ({ children: e }) => {
|
|
1179
|
+
const { id: t, value: o, onChange: r, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: I } = T(), L = be("streetNumber"), b = E(e, ae.Label), p = E(e, ae.Input), y = E(e, ae.Description), N = E(e, ae.Error);
|
|
1180
|
+
return /* @__PURE__ */ n.createElement(u, {
|
|
1181
|
+
fieldId: t,
|
|
1182
|
+
renderLabel: () => h(b, {
|
|
1183
|
+
label: L
|
|
1184
|
+
}),
|
|
1185
|
+
renderInput: () => /* @__PURE__ */ n.createElement(Ce, {
|
|
1186
|
+
"aria-labelledby": I,
|
|
1187
|
+
value: o ?? "",
|
|
1188
|
+
onChange: r,
|
|
1189
|
+
isDisabled: a,
|
|
1190
|
+
isReadOnly: l,
|
|
1191
|
+
isRequired: i,
|
|
1192
|
+
isInvalid: s,
|
|
1193
|
+
onBlur: d,
|
|
1194
|
+
onFocus: m
|
|
1195
|
+
}, p),
|
|
1196
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, N, y)
|
|
1197
|
+
});
|
|
1198
|
+
}, Kn = ({ className: e }) => {
|
|
1199
|
+
const { id: t, placeholder: o } = P(), { inputId: r, ariaDescribedBy: a } = T(), l = B(null);
|
|
1200
|
+
return le(() => {
|
|
1201
|
+
var i;
|
|
1202
|
+
(i = l.current) == null || i.focus();
|
|
1203
|
+
}, t), /* @__PURE__ */ n.createElement(ie, {
|
|
1204
|
+
ref: l,
|
|
1205
|
+
id: r,
|
|
1206
|
+
"aria-describedby": a,
|
|
1207
|
+
className: e,
|
|
1208
|
+
placeholder: o
|
|
1209
|
+
});
|
|
1210
|
+
};
|
|
1211
|
+
ae.Label = ue;
|
|
1212
|
+
ae.Input = Kn;
|
|
1213
|
+
ae.Description = ce;
|
|
1214
|
+
ae.Error = de;
|
|
1215
|
+
const H = ({ children: e }) => {
|
|
1216
|
+
const { id: t, value: o, onChange: r, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: I } = T(), { t: L } = qe(), b = Ne(), p = b ? he[b] : void 0, y = b && xt.getCountryByShortKey(b), N = w(() => {
|
|
1217
|
+
var M;
|
|
1218
|
+
return (Bt(((M = y == null ? void 0 : y.subdivisions) == null ? void 0 : M.list) || [], p) || []).map((j) => ({
|
|
1219
|
+
value: j.key,
|
|
1220
|
+
label: L(j.displayName)
|
|
1221
|
+
})).sort((j, A) => j.label.localeCompare(A.label));
|
|
1222
|
+
}, [
|
|
1223
|
+
p,
|
|
1224
|
+
L,
|
|
1225
|
+
y
|
|
1226
|
+
]), F = D(() => r(""), [
|
|
1227
|
+
r
|
|
1228
|
+
]), { onInputKeyDown: S, ...g } = Rt({
|
|
1229
|
+
options: N,
|
|
1230
|
+
value: o,
|
|
1231
|
+
commit: r,
|
|
1232
|
+
clear: F,
|
|
1233
|
+
onBlur: d
|
|
1234
|
+
}), R = be("subdivision"), q = E(e, H.Label), _ = E(e, H.Control), O = E(e, H.Options), v = E(e, H.Description), pe = E(e, H.Error);
|
|
1235
|
+
return /* @__PURE__ */ n.createElement(u, {
|
|
1236
|
+
fieldId: t,
|
|
1237
|
+
renderLabel: () => h(q, {
|
|
1238
|
+
label: R
|
|
1239
|
+
}),
|
|
1240
|
+
renderInput: () => /* @__PURE__ */ n.createElement(Re, {
|
|
1241
|
+
"aria-labelledby": I,
|
|
1242
|
+
...g,
|
|
1243
|
+
isDisabled: a,
|
|
1244
|
+
isReadOnly: l,
|
|
1245
|
+
isRequired: i,
|
|
1246
|
+
isInvalid: s,
|
|
1247
|
+
onFocus: m,
|
|
1248
|
+
menuTrigger: "input"
|
|
1249
|
+
}, h(_, {
|
|
1250
|
+
onKeyDown: S
|
|
1251
|
+
}), h(O, {
|
|
1252
|
+
options: N
|
|
1253
|
+
})),
|
|
1254
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, pe, v)
|
|
1255
|
+
});
|
|
1256
|
+
}, Se = ({ children: e, className: t, ...o }) => {
|
|
1257
|
+
const { disabled: r, hasError: a } = P(), { onKeyDown: l } = o, i = E(e, Se.Input), s = E(e, Se.Trigger);
|
|
1258
|
+
return /* @__PURE__ */ n.createElement(Lt, {
|
|
1259
|
+
className: t,
|
|
1260
|
+
isDisabled: r,
|
|
1261
|
+
isInvalid: a
|
|
1262
|
+
}, h(i, {
|
|
1263
|
+
onKeyDown: l
|
|
1264
|
+
}), s);
|
|
1265
|
+
}, Yn = ({ className: e, ...t }) => {
|
|
1266
|
+
const { id: o, placeholder: r, readOnly: a, disabled: l } = P(), { inputId: i, ariaDescribedBy: s } = T(), { onKeyDown: d } = t, m = B(null), u = Dt({
|
|
1267
|
+
readOnly: a,
|
|
1268
|
+
disabled: l
|
|
1269
|
+
});
|
|
1270
|
+
return le(() => {
|
|
1271
|
+
var I;
|
|
1272
|
+
(I = m.current) == null || I.focus();
|
|
1273
|
+
}, o), /* @__PURE__ */ n.createElement(ie, {
|
|
1274
|
+
ref: m,
|
|
1275
|
+
id: i,
|
|
1276
|
+
"aria-describedby": s,
|
|
1277
|
+
className: e,
|
|
1278
|
+
placeholder: r,
|
|
1279
|
+
onClick: u,
|
|
1280
|
+
onKeyDown: d
|
|
1281
|
+
});
|
|
1282
|
+
}, Hn = ({ children: e, className: t }) => /* @__PURE__ */ n.createElement(Nt, {
|
|
1283
|
+
className: t
|
|
1284
|
+
}, e);
|
|
1285
|
+
Se.Input = Yn;
|
|
1286
|
+
Se.Trigger = Hn;
|
|
1287
|
+
const ze = ({ children: e, className: t, ...o }) => {
|
|
1288
|
+
const { options: r } = o, a = E(e, ze.Option);
|
|
1289
|
+
return /* @__PURE__ */ n.createElement(Ae, {
|
|
1290
|
+
className: t,
|
|
1291
|
+
containerPadding: 0,
|
|
1292
|
+
offset: 0
|
|
1293
|
+
}, /* @__PURE__ */ n.createElement(_e, null, r.map((l) => h(a, {
|
|
1294
|
+
key: l.value,
|
|
1295
|
+
value: l.value,
|
|
1296
|
+
label: l.label
|
|
1297
|
+
}))));
|
|
1298
|
+
}, jn = ({ className: e, ...t }) => {
|
|
1299
|
+
const { value: o, label: r } = t;
|
|
1300
|
+
return /* @__PURE__ */ n.createElement(Pe, {
|
|
1301
|
+
className: e,
|
|
1302
|
+
id: o,
|
|
1303
|
+
textValue: r
|
|
1304
|
+
}, r);
|
|
1305
|
+
};
|
|
1306
|
+
ze.Option = jn;
|
|
1307
|
+
H.Label = ue;
|
|
1308
|
+
H.Control = Se;
|
|
1309
|
+
H.Options = ze;
|
|
1310
|
+
H.Description = ce;
|
|
1311
|
+
H.Error = de;
|
|
1312
|
+
const Jn = () => me("country"), Gn = () => me("subdivision"), Xn = () => me("city"), zn = () => me("addressLine"), Qn = () => me("addressLine2"), Zn = () => me("postalCode"), er = () => me("streetName"), tr = () => me("streetNumber"), nr = () => me("apartment"), rr = {
|
|
1313
|
+
[K.MLA_COUNTRY]: Jn,
|
|
1314
|
+
[K.MLA_SUBDIVISION]: Gn,
|
|
1315
|
+
[K.MLA_CITY]: Xn,
|
|
1316
|
+
[K.MLA_ADDRESS_LINE]: zn,
|
|
1317
|
+
[K.MLA_ADDRESS_LINE_2]: Qn,
|
|
1318
|
+
[K.MLA_POSTAL_CODE]: Zn,
|
|
1319
|
+
[K.MLA_STREET_NAME]: er,
|
|
1320
|
+
[K.MLA_STREET_NUMBER]: tr,
|
|
1321
|
+
[K.MLA_APARTMENT]: nr
|
|
1322
|
+
}, or = {}, sr = [], c = ({ children: e }) => {
|
|
1323
|
+
const { id: t, form: o, value: r, onChange: a, onFieldBlur: l, onFieldFocus: i, errors: s, FieldLayout: d, fieldSettings: m, label: u, validation: I, target: L, autocompleteEnabled: b, required: p, fieldType: y } = P(), [N, F] = ye(null), S = kt(), g = w(() => ({
|
|
1324
|
+
...S,
|
|
1325
|
+
...rr
|
|
1326
|
+
}), [
|
|
1327
|
+
S
|
|
1328
|
+
]), { isExperimentEnabled: R } = bt(), q = R(ft.STREETLESS_LOCALITY_FALLBACK), { validateFields: _ } = $t(), O = Ut(), v = Ct(), pe = w(() => ({
|
|
1329
|
+
...v,
|
|
1330
|
+
actions: {
|
|
1331
|
+
predict: Kt,
|
|
1332
|
+
getPlace: Vt,
|
|
1333
|
+
searchByPostalCode: Wt,
|
|
1334
|
+
...v.actions
|
|
1335
|
+
}
|
|
1336
|
+
}), [
|
|
1337
|
+
v
|
|
1338
|
+
]), { form: x, isMultilineAddressField: M } = pn({
|
|
1339
|
+
id: t,
|
|
1340
|
+
target: L,
|
|
1341
|
+
fieldType: y,
|
|
1342
|
+
form: o,
|
|
1343
|
+
country: r == null ? void 0 : r.country,
|
|
1344
|
+
fieldSettings: m,
|
|
1345
|
+
validation: I,
|
|
1346
|
+
required: p
|
|
1347
|
+
}), j = D((W) => {
|
|
1348
|
+
if (!r)
|
|
1349
|
+
return;
|
|
1350
|
+
const G = en(W, M, q), Te = {
|
|
1351
|
+
...G,
|
|
1352
|
+
[Ie.COUNTRY]: G[Ie.COUNTRY] ?? r[Ie.COUNTRY]
|
|
1353
|
+
};
|
|
1354
|
+
a == null || a(Te);
|
|
1355
|
+
}, [
|
|
1356
|
+
a,
|
|
1357
|
+
r,
|
|
1358
|
+
M,
|
|
1359
|
+
q
|
|
1360
|
+
]), A = D((W, G) => {
|
|
1361
|
+
if (M && W === Ie.COUNTRY && (r == null ? void 0 : r[W]) !== G) {
|
|
1362
|
+
a == null || a({
|
|
1363
|
+
[Ie.COUNTRY]: G
|
|
1364
|
+
});
|
|
1365
|
+
return;
|
|
1366
|
+
}
|
|
1367
|
+
a == null || a({
|
|
1368
|
+
...r,
|
|
1369
|
+
[W]: G
|
|
1370
|
+
});
|
|
1371
|
+
}, [
|
|
1372
|
+
a,
|
|
1373
|
+
r,
|
|
1374
|
+
M
|
|
1375
|
+
]), J = D(async (W) => _(M ? [
|
|
1376
|
+
...W,
|
|
1377
|
+
{
|
|
1378
|
+
path: `${L}/${Ie.COUNTRY}`,
|
|
1379
|
+
value: r == null ? void 0 : r.country
|
|
1380
|
+
}
|
|
1381
|
+
] : W), [
|
|
1382
|
+
r,
|
|
1383
|
+
L,
|
|
1384
|
+
_,
|
|
1385
|
+
M
|
|
1386
|
+
]);
|
|
1387
|
+
Yt(t, () => {
|
|
1388
|
+
var Te;
|
|
1389
|
+
const W = s == null ? void 0 : s[0], G = (Te = x == null ? void 0 : x.fields) == null ? void 0 : Te.find((st) => "target" in st && st.target === (W == null ? void 0 : W.errorPath));
|
|
1390
|
+
return G == null ? void 0 : G.id;
|
|
1391
|
+
});
|
|
1392
|
+
const Ee = E(e, c.Country), Oe = E(e, c.Subdivision), Qe = E(e, c.City), Ze = E(e, c.AddressLine), et = E(e, c.AddressLine2), tt = E(e, c.PostalCode), nt = E(e, c.StreetName), rt = E(e, c.StreetNumber), ot = E(e, c.Apartment), At = w(() => ({
|
|
1393
|
+
country: Ee,
|
|
1394
|
+
subdivision: Oe,
|
|
1395
|
+
city: Qe,
|
|
1396
|
+
addressLine: Ze,
|
|
1397
|
+
addressLine2: et,
|
|
1398
|
+
postalCode: tt,
|
|
1399
|
+
streetName: nt,
|
|
1400
|
+
streetNumber: rt,
|
|
1401
|
+
apartment: ot
|
|
1402
|
+
}), [
|
|
1403
|
+
Ee,
|
|
1404
|
+
Oe,
|
|
1405
|
+
Qe,
|
|
1406
|
+
Ze,
|
|
1407
|
+
et,
|
|
1408
|
+
tt,
|
|
1409
|
+
nt,
|
|
1410
|
+
rt,
|
|
1411
|
+
ot
|
|
1412
|
+
]);
|
|
1413
|
+
return x ? /* @__PURE__ */ n.createElement(d, {
|
|
1414
|
+
fieldId: t
|
|
1415
|
+
}, /* @__PURE__ */ n.createElement(nn, {
|
|
1416
|
+
countryCode: r == null ? void 0 : r.country
|
|
1417
|
+
}, /* @__PURE__ */ n.createElement(tn, {
|
|
1418
|
+
autocompleteEnabled: b,
|
|
1419
|
+
onAddressSelect: j
|
|
1420
|
+
}, /* @__PURE__ */ n.createElement(En, {
|
|
1421
|
+
fields: At
|
|
1422
|
+
}, /* @__PURE__ */ n.createElement("div", {
|
|
1423
|
+
ref: F,
|
|
1424
|
+
style: {
|
|
1425
|
+
display: "contents"
|
|
1426
|
+
}
|
|
1427
|
+
}), /* @__PURE__ */ n.createElement(_t, {
|
|
1428
|
+
getContainer: () => N
|
|
1429
|
+
}, /* @__PURE__ */ n.createElement("fieldset", {
|
|
1430
|
+
style: jt
|
|
1431
|
+
}, /* @__PURE__ */ n.createElement("legend", {
|
|
1432
|
+
style: Jt
|
|
1433
|
+
}, u), /* @__PURE__ */ n.createElement(Ht, {
|
|
1434
|
+
formSchema: O,
|
|
1435
|
+
form: x,
|
|
1436
|
+
values: r ?? or,
|
|
1437
|
+
onFieldChange: A,
|
|
1438
|
+
onBlur: l,
|
|
1439
|
+
onFocus: i,
|
|
1440
|
+
errors: s ?? sr,
|
|
1441
|
+
validateFields: J,
|
|
1442
|
+
fields: g,
|
|
1443
|
+
fieldActions: pe
|
|
1444
|
+
}))))))) : null;
|
|
1445
|
+
};
|
|
1446
|
+
c.Country = Y;
|
|
1447
|
+
c.Subdivision = H;
|
|
1448
|
+
c.City = se;
|
|
1449
|
+
c.AddressLine = k;
|
|
1450
|
+
c.AddressLine2 = re;
|
|
1451
|
+
c.PostalCode = $;
|
|
1452
|
+
c.StreetName = U;
|
|
1453
|
+
c.StreetNumber = ae;
|
|
1454
|
+
c.Apartment = oe;
|
|
1455
|
+
const ar = "_postalCodeControl_1tire_1", lr = "_comboControl_1tire_5", ir = "_comboTrigger_1tire_19", ve = {
|
|
1456
|
+
postalCodeControl: ar,
|
|
1457
|
+
comboControl: lr,
|
|
1458
|
+
comboTrigger: ir
|
|
1459
|
+
}, Fr = () => /* @__PURE__ */ n.createElement(c, null, /* @__PURE__ */ n.createElement(c.Country, null, /* @__PURE__ */ n.createElement(c.Country.Label, {
|
|
1460
|
+
className: C(Q, f.label)
|
|
1461
|
+
}, /* @__PURE__ */ n.createElement(c.Country.Label.Required, {
|
|
1462
|
+
className: C(Z, f.requiredMark)
|
|
1463
|
+
})), /* @__PURE__ */ n.createElement(c.Country.Control, {
|
|
1464
|
+
className: C(ee, f.input, ve.comboControl)
|
|
1465
|
+
}, /* @__PURE__ */ n.createElement(c.Country.Control.Input, {
|
|
1466
|
+
className: C(f.innerInput, fe)
|
|
1467
|
+
}), /* @__PURE__ */ n.createElement(c.Country.Control.Trigger, {
|
|
1468
|
+
className: ve.comboTrigger
|
|
1469
|
+
}, /* @__PURE__ */ n.createElement(lt, {
|
|
1470
|
+
className: f.dropdownIcon
|
|
1471
|
+
}))), /* @__PURE__ */ n.createElement(c.Country.Options, {
|
|
1472
|
+
className: C(ge, f.selectPopover, f.dropdownPopover)
|
|
1473
|
+
}, /* @__PURE__ */ n.createElement(c.Country.Options.Option, {
|
|
1474
|
+
className: C(f.selectOption, fe)
|
|
1475
|
+
})), /* @__PURE__ */ n.createElement(c.Country.Error, {
|
|
1476
|
+
className: C(te, f.error)
|
|
1477
|
+
}, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.Country.Error.Text, null)), /* @__PURE__ */ n.createElement(c.Country.Description, {
|
|
1478
|
+
className: C(ne, f.description)
|
|
1479
|
+
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(X, {
|
|
1480
|
+
content: e,
|
|
1481
|
+
locale: t
|
|
1482
|
+
}))), /* @__PURE__ */ n.createElement(c.AddressLine, null, /* @__PURE__ */ n.createElement(c.AddressLine.Label, {
|
|
1483
|
+
className: C(Q, f.label)
|
|
1484
|
+
}, /* @__PURE__ */ n.createElement(c.AddressLine.Label.Required, {
|
|
1485
|
+
className: C(Z, f.requiredMark)
|
|
1486
|
+
})), /* @__PURE__ */ n.createElement(c.AddressLine.Input, {
|
|
1487
|
+
className: C(ee, f.input)
|
|
1488
|
+
}), /* @__PURE__ */ n.createElement(c.AddressLine.Options, {
|
|
1489
|
+
className: C(ge, f.selectPopover, f.dropdownPopover)
|
|
1490
|
+
}, /* @__PURE__ */ n.createElement(c.AddressLine.Options.Option, {
|
|
1491
|
+
className: C(f.selectOption, fe)
|
|
1492
|
+
})), /* @__PURE__ */ n.createElement(c.AddressLine.Error, {
|
|
1493
|
+
className: C(te, f.error)
|
|
1494
|
+
}, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.AddressLine.Error.Text, null)), /* @__PURE__ */ n.createElement(c.AddressLine.Description, {
|
|
1495
|
+
className: C(ne, f.description)
|
|
1496
|
+
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(X, {
|
|
1497
|
+
content: e,
|
|
1498
|
+
locale: t
|
|
1499
|
+
}))), /* @__PURE__ */ n.createElement(c.AddressLine2, null, /* @__PURE__ */ n.createElement(c.AddressLine2.Label, {
|
|
1500
|
+
className: C(Q, f.label)
|
|
1501
|
+
}, /* @__PURE__ */ n.createElement(c.AddressLine2.Label.Required, {
|
|
1502
|
+
className: C(Z, f.requiredMark)
|
|
1503
|
+
})), /* @__PURE__ */ n.createElement(c.AddressLine2.Input, {
|
|
1504
|
+
className: C(ee, f.input)
|
|
1505
|
+
}), /* @__PURE__ */ n.createElement(c.AddressLine2.Error, {
|
|
1506
|
+
className: C(te, f.error)
|
|
1507
|
+
}, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.AddressLine2.Error.Text, null)), /* @__PURE__ */ n.createElement(c.AddressLine2.Description, {
|
|
1508
|
+
className: C(ne, f.description)
|
|
1509
|
+
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(X, {
|
|
1510
|
+
content: e,
|
|
1511
|
+
locale: t
|
|
1512
|
+
}))), /* @__PURE__ */ n.createElement(c.City, null, /* @__PURE__ */ n.createElement(c.City.Label, {
|
|
1513
|
+
className: C(Q, f.label)
|
|
1514
|
+
}, /* @__PURE__ */ n.createElement(c.City.Label.Required, {
|
|
1515
|
+
className: C(Z, f.requiredMark)
|
|
1516
|
+
})), /* @__PURE__ */ n.createElement(c.City.Input, {
|
|
1517
|
+
className: C(ee, f.input)
|
|
1518
|
+
}), /* @__PURE__ */ n.createElement(c.City.Error, {
|
|
1519
|
+
className: C(te, f.error)
|
|
1520
|
+
}, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.City.Error.Text, null)), /* @__PURE__ */ n.createElement(c.City.Description, {
|
|
1521
|
+
className: C(ne, f.description)
|
|
1522
|
+
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(X, {
|
|
1523
|
+
content: e,
|
|
1524
|
+
locale: t
|
|
1525
|
+
}))), /* @__PURE__ */ n.createElement(c.PostalCode, null, /* @__PURE__ */ n.createElement(c.PostalCode.Label, {
|
|
1526
|
+
className: C(Q, f.label)
|
|
1527
|
+
}, /* @__PURE__ */ n.createElement(c.PostalCode.Label.Required, {
|
|
1528
|
+
className: C(Z, f.requiredMark)
|
|
1529
|
+
})), /* @__PURE__ */ n.createElement(c.PostalCode.Control, {
|
|
1530
|
+
className: ve.postalCodeControl
|
|
1531
|
+
}, /* @__PURE__ */ n.createElement(c.PostalCode.Control.Input, {
|
|
1532
|
+
className: C(ee, f.input)
|
|
1533
|
+
})), /* @__PURE__ */ n.createElement(c.PostalCode.Options, {
|
|
1534
|
+
className: C(ge, f.selectPopover, f.dropdownPopover)
|
|
1535
|
+
}, /* @__PURE__ */ n.createElement(c.PostalCode.Options.Option, {
|
|
1536
|
+
className: C(f.selectOption, fe)
|
|
1537
|
+
})), /* @__PURE__ */ n.createElement(c.PostalCode.Error, {
|
|
1538
|
+
className: C(te, f.error)
|
|
1539
|
+
}, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.PostalCode.Error.Text, null)), /* @__PURE__ */ n.createElement(c.PostalCode.Description, {
|
|
1540
|
+
className: C(ne, f.description)
|
|
1541
|
+
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(X, {
|
|
1542
|
+
content: e,
|
|
1543
|
+
locale: t
|
|
1544
|
+
}))), /* @__PURE__ */ n.createElement(c.Subdivision, null, /* @__PURE__ */ n.createElement(c.Subdivision.Label, {
|
|
1545
|
+
className: C(Q, f.label)
|
|
1546
|
+
}, /* @__PURE__ */ n.createElement(c.Subdivision.Label.Required, {
|
|
1547
|
+
className: C(Z, f.requiredMark)
|
|
1548
|
+
})), /* @__PURE__ */ n.createElement(c.Subdivision.Control, {
|
|
1549
|
+
className: C(ee, f.input, ve.comboControl)
|
|
1550
|
+
}, /* @__PURE__ */ n.createElement(c.Subdivision.Control.Input, {
|
|
1551
|
+
className: C(f.innerInput, fe)
|
|
1552
|
+
}), /* @__PURE__ */ n.createElement(c.Subdivision.Control.Trigger, {
|
|
1553
|
+
className: ve.comboTrigger
|
|
1554
|
+
}, /* @__PURE__ */ n.createElement(lt, {
|
|
1555
|
+
className: f.dropdownIcon
|
|
1556
|
+
}))), /* @__PURE__ */ n.createElement(c.Subdivision.Options, {
|
|
1557
|
+
className: C(ge, f.selectPopover, f.dropdownPopover)
|
|
1558
|
+
}, /* @__PURE__ */ n.createElement(c.Subdivision.Options.Option, {
|
|
1559
|
+
className: C(f.selectOption, fe)
|
|
1560
|
+
})), /* @__PURE__ */ n.createElement(c.Subdivision.Error, {
|
|
1561
|
+
className: C(te, f.error)
|
|
1562
|
+
}, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.Subdivision.Error.Text, null)), /* @__PURE__ */ n.createElement(c.Subdivision.Description, {
|
|
1563
|
+
className: C(ne, f.description)
|
|
1564
|
+
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(X, {
|
|
1565
|
+
content: e,
|
|
1566
|
+
locale: t
|
|
1567
|
+
}))), /* @__PURE__ */ n.createElement(c.StreetName, null, /* @__PURE__ */ n.createElement(c.StreetName.Label, {
|
|
1568
|
+
className: C(Q, f.label)
|
|
1569
|
+
}, /* @__PURE__ */ n.createElement(c.StreetName.Label.Required, {
|
|
1570
|
+
className: C(Z, f.requiredMark)
|
|
1571
|
+
})), /* @__PURE__ */ n.createElement(c.StreetName.Input, {
|
|
1572
|
+
className: C(ee, f.input)
|
|
1573
|
+
}), /* @__PURE__ */ n.createElement(c.StreetName.Options, {
|
|
1574
|
+
className: C(ge, f.selectPopover, f.dropdownPopover)
|
|
1575
|
+
}, /* @__PURE__ */ n.createElement(c.StreetName.Options.Option, {
|
|
1576
|
+
className: C(f.selectOption, fe)
|
|
1577
|
+
})), /* @__PURE__ */ n.createElement(c.StreetName.Error, {
|
|
1578
|
+
className: C(te, f.error)
|
|
1579
|
+
}, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.StreetName.Error.Text, null)), /* @__PURE__ */ n.createElement(c.StreetName.Description, {
|
|
1580
|
+
className: C(ne, f.description)
|
|
1581
|
+
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(X, {
|
|
1582
|
+
content: e,
|
|
1583
|
+
locale: t
|
|
1584
|
+
}))), /* @__PURE__ */ n.createElement(c.StreetNumber, null, /* @__PURE__ */ n.createElement(c.StreetNumber.Label, {
|
|
1585
|
+
className: C(Q, f.label)
|
|
1586
|
+
}, /* @__PURE__ */ n.createElement(c.StreetNumber.Label.Required, {
|
|
1587
|
+
className: C(Z, f.requiredMark)
|
|
1588
|
+
})), /* @__PURE__ */ n.createElement(c.StreetNumber.Input, {
|
|
1589
|
+
className: C(ee, f.input)
|
|
1590
|
+
}), /* @__PURE__ */ n.createElement(c.StreetNumber.Error, {
|
|
1591
|
+
className: C(te, f.error)
|
|
1592
|
+
}, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.StreetNumber.Error.Text, null)), /* @__PURE__ */ n.createElement(c.StreetNumber.Description, {
|
|
1593
|
+
className: C(ne, f.description)
|
|
1594
|
+
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(X, {
|
|
1595
|
+
content: e,
|
|
1596
|
+
locale: t
|
|
1597
|
+
}))), /* @__PURE__ */ n.createElement(c.Apartment, null, /* @__PURE__ */ n.createElement(c.Apartment.Label, {
|
|
1598
|
+
className: C(Q, f.label)
|
|
1599
|
+
}, /* @__PURE__ */ n.createElement(c.Apartment.Label.Required, {
|
|
1600
|
+
className: C(Z, f.requiredMark)
|
|
1601
|
+
})), /* @__PURE__ */ n.createElement(c.Apartment.Input, {
|
|
1602
|
+
className: C(ee, f.input)
|
|
1603
|
+
}), /* @__PURE__ */ n.createElement(c.Apartment.Error, {
|
|
1604
|
+
className: C(te, f.error)
|
|
1605
|
+
}, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.Apartment.Error.Text, null)), /* @__PURE__ */ n.createElement(c.Apartment.Description, {
|
|
1606
|
+
className: C(ne, f.description)
|
|
1607
|
+
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(X, {
|
|
1608
|
+
content: e,
|
|
1609
|
+
locale: t
|
|
1610
|
+
}))));
|
|
1611
|
+
export {
|
|
1612
|
+
Fr as M
|
|
1613
|
+
};
|