@wix/form-elements 1.94.0 → 1.96.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-CNIizm60.js → appointment-rac-BKgRKq3j.js} +309 -310
- package/dist/component/{bookings-address-rac-C7ukrF1D.js → bookings-address-rac-C87x19gw.js} +1 -1
- package/dist/component/{bookings-email-rac-DnzbLEmf.js → bookings-email-rac-f4nuC_pb.js} +1 -1
- package/dist/component/{bookings-first-name-rac-8Krm-3QK.js → bookings-first-name-rac-BGmuAmbu.js} +1 -1
- package/dist/component/{bookings-header-rac-WRILbKeE.js → bookings-header-rac-CoyxHljp.js} +1 -1
- package/dist/component/{bookings-last-name-rac-C0-yWBLa.js → bookings-last-name-rac-D2mBYwcR.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-Bc9u_rn_.js → bookings-login-bar-rac-BH2Mi6TR.js} +4 -4
- package/dist/component/{bookings-phone-rac-BaBlg7f7.js → bookings-phone-rac-Dz78ybFV.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DR-Ngu_b.js → bookings-rich-text-rac-8_h0cOoy.js} +1 -1
- package/dist/component/{get-first-day-of-the-week-DvnsxYhQ.js → calendar.module-DnhTT4QT.js} +23 -18
- package/dist/component/{checkbox-field-rac-Cqr57TgJ.js → checkbox-field-rac-CJnegjvL.js} +5 -5
- package/dist/component/{checkbox-group-field-headless-Bgcvavr3.js → checkbox-group-field-headless-CrA7Gx2Y.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-Bcsowjwp.js → checkbox-group-field-rac-DMg75l5Q.js} +12 -12
- package/dist/component/{checkbox-group-rac-38j0b8_U.js → checkbox-group-rac-C9XWlO5D.js} +1 -1
- package/dist/component/{checkbox-rac-Bb5ZxZo7.js → checkbox-rac-CrqhH4z9.js} +1 -1
- package/dist/component/{contacts-address-rac-gaOhfztb.js → contacts-address-rac-C2mqTiPg.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DAIPR64p.js → contacts-birthdate-rac-i7_RMona.js} +1 -1
- package/dist/component/{contacts-company-rac-DVPQrcfN.js → contacts-company-rac-7sdIosaG.js} +1 -1
- package/dist/component/{contacts-email-rac-qMyFjz_2.js → contacts-email-rac-CrsksJ9G.js} +1 -1
- package/dist/component/{contacts-first-name-rac-OVPtHcde.js → contacts-first-name-rac-I5xIYxgD.js} +1 -1
- package/dist/component/{contacts-last-name-rac-BmLQrJ2D.js → contacts-last-name-rac-DnzJYJh7.js} +1 -1
- package/dist/component/{contacts-phone-rac-D7waZc1q.js → contacts-phone-rac-Cx1jpYmv.js} +1 -1
- package/dist/component/{contacts-position-rac-DnI3o3Am.js → contacts-position-rac-CxddG_cE.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-P8zn8_GS.js → contacts-subscribe-rac-C1nTAhnd.js} +2 -2
- package/dist/component/{contacts-tax-id-rac-9CBr2KkR.js → contacts-tax-id-rac-B1lzfrj_.js} +1 -1
- package/dist/component/{date-availability--ntpBDiI.js → date-availability-LN33GU7O.js} +1 -1
- package/dist/component/{date-input-field-rac-Don2tz5U.js → date-input-field-rac-zTcw6Mxx.js} +57 -56
- package/dist/component/{date-input-rac-Du3e8Hcu.js → date-input-rac-NfVbrcoO.js} +1 -1
- package/dist/component/date-picker-field-rac-Cc9hJloJ.js +317 -0
- package/dist/component/{date-picker-rac-BsCMkfHV.js → date-picker-rac-C5iXyKdf.js} +1 -1
- package/dist/component/{date-time-input-field-rac-LLF1UdUD.js → date-time-input-field-rac-Cp34u7cC.js} +53 -52
- package/dist/component/{date-time-input-rac-KYqrNgbb.js → date-time-input-rac-CfFd56Xf.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-DaOY9Cb6.js → dext-checkbox-group-rac-BVx7XXwR.js} +2 -2
- package/dist/component/{dext-checkbox-rac-Ceu5q9xf.js → dext-checkbox-rac-CmUOLx_w.js} +1 -1
- package/dist/component/{dext-date-picker-rac-iop0XEpQ.js → dext-date-picker-rac-XDrLGVTQ.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-DJB_fMiN.js → dext-date-time-input-rac-ZLCq_taK.js} +1 -1
- package/dist/component/{dext-dropdown-rac-Dhp4CUZ5.js → dext-dropdown-rac-C74zBq3M.js} +1 -1
- package/dist/component/{dext-email-rac-BIr9RxhQ.js → dext-email-rac-CqS9HcdY.js} +1 -1
- package/dist/component/{dext-number-input-rac-Q8p3NeKN.js → dext-number-input-rac-DszjJDT-.js} +1 -1
- package/dist/component/{dext-phone-rac-DRdRLIvr.js → dext-phone-rac-wt7T8hpM.js} +1 -1
- package/dist/component/{dext-radio-group-rac-D1N_wBhO.js → dext-radio-group-rac-BvRnaWP0.js} +2 -2
- package/dist/component/{dext-rating-input-rac-BQIMl7oQ.js → dext-rating-input-rac-D1Lt9M3c.js} +1 -1
- package/dist/component/{dext-tags-rac-C52jiu1I.js → dext-tags-rac-70YO5CJH.js} +2 -2
- package/dist/component/{dext-text-area-rac-BWmSs4mb.js → dext-text-area-rac-CC5RCvWh.js} +1 -1
- package/dist/component/{dext-text-input-rac-BnAJ-7Hs.js → dext-text-input-rac-s487DzPW.js} +1 -1
- package/dist/component/{dext-url-input-rac-CvGn3KHo.js → dext-url-input-rac-DEKwUh2a.js} +1 -1
- package/dist/component/{donation-rac-DsFRs16V.js → donation-rac-C2bCFVHP.js} +30 -30
- package/dist/component/{dropdown-field-headless-K0AM4AAs.js → dropdown-field-headless-BMWwkydq.js} +4 -4
- package/dist/component/{dropdown-field-rac-CMEB8ZQN.js → dropdown-field-rac-Cw5Cbpg0.js} +5 -5
- package/dist/component/{dropdown-rac-BakYShkm.js → dropdown-rac-CEmlDY3w.js} +1 -1
- package/dist/component/{ecom-address-rac-A_Aj5CX0.js → ecom-address-rac-Dv6asnf_.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-Ddol0N03.js → ecom-subscription-checkbox-rac-DOwH-Ebd.js} +3 -3
- package/dist/component/{email-input-field-rac-B7yOMDWB.js → email-input-field-rac-CeFXPibq.js} +41 -41
- package/dist/component/events-repeater-rac-BUk5Qc8n.js +267 -0
- package/dist/component/{events-rsvp-rac-DfjqTM7C.js → events-rsvp-rac-CtFkVzUy.js} +20 -20
- package/dist/component/{field-error-headless-CONyKitA.js → field-error-headless-B6x_cVEi.js} +1 -1
- package/dist/component/{field-label-headless-tf9QXhMi.js → field-label-headless-BibCD8xx.js} +1 -1
- package/dist/component/{file-upload-rac-Bng5Yew9.js → file-upload-rac-BUcktluW.js} +43 -43
- package/dist/component/{fixed-payment-rac-CXIv7_Oj.js → fixed-payment-rac-BMSBSo5c.js} +10 -10
- package/dist/component/{form-Lv-a47BN.js → form-9WmwgGNc.js} +1120 -1108
- package/dist/component/{form-element-classes-CLZXu-91.js → form-element-classes-BtKlobUX.js} +60 -59
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-BZdYszfP.js → header-field-rac-CxUuHOic.js} +3 -3
- package/dist/component/{header-rac-BNeqoDyT.js → header-rac-DejI69X7.js} +1 -1
- package/dist/component/{image-choice-rac-aSKDRo51.js → image-choice-rac-BjI5a_co.js} +15 -15
- package/dist/component/{index-DnNA6zNR.js → index-Csso-2QH.js} +2 -2
- package/dist/component/{index-CWZfskEy.js → index-Dz2hV2_S.js} +4 -4
- package/dist/component/{isObjectLike-C9ogbjhq.js → isObjectLike-BN_BZMhy.js} +1 -1
- package/dist/component/{multiline-address-field-rac-CHE1mE_b.js → multiline-address-field-rac-CYfphmfr.js} +86 -85
- package/dist/component/{multiline-address-rac-wxJunvdU.js → multiline-address-rac-Ccujt2bd.js} +1 -1
- package/dist/component/{number-input-field-rac-ore1oi9q.js → number-input-field-rac-CfnRCRar.js} +18 -18
- package/dist/component/{number-input-rac-DU-rCrjJ.js → number-input-rac-DnTO9d8P.js} +1 -1
- package/dist/component/{password-rac-Dkqv0AIm.js → password-rac-Be_YSb-Q.js} +37 -37
- package/dist/component/{payment-input-rac-CsTcFhQ5.js → payment-input-rac-DXUf5iYb.js} +22 -22
- package/dist/component/{phone-input-field-rac-lIVKt7ge.js → phone-input-field-rac-DYAwLuvJ.js} +32 -31
- package/dist/component/{phone-rac-CZlsXHRM.js → phone-rac-BlsvDmER.js} +1 -1
- package/dist/component/{product-list-rac-UebyHfhC.js → product-list-rac-DdXwRSc2.js} +15 -15
- package/dist/component/{quiz-radio-group-rac-ORLTYxdR.js → quiz-radio-group-rac-B0yiKdbu.js} +2 -2
- package/dist/component/{radio-button-module-classes-CEQr0hKB.js → radio-button-module-classes-t1jsWYpT.js} +3 -3
- package/dist/component/{radio-group-field-rac-t_Dj1_4p.js → radio-group-field-rac-Cug1TtSq.js} +4 -4
- package/dist/component/{radio-group-rac-CC_35nq4.js → radio-group-rac-_O5T0Pt8.js} +1 -1
- package/dist/component/{rating-input-field-rac-BU66cRhy.js → rating-input-field-rac-BSKzQ3fq.js} +31 -31
- package/dist/component/{rating-input-rac-KgNbgchh.js → rating-input-rac-B71q44YO.js} +1 -1
- package/dist/component/{rich-content-rac.module-oGcFL-hl.js → rich-content-rac.module-BJuoKIOt.js} +1 -1
- package/dist/component/{rich-text-field-rac-CiwMiMv7.js → rich-text-field-rac-CiSR82Fw.js} +3 -3
- package/dist/component/{rich-text-rac-Dmp0xxpi.js → rich-text-rac-Bo6UBwOg.js} +1 -1
- package/dist/component/{service-dropdown-rac-_QBi8_AO.js → service-dropdown-rac-BJ7V-g8M.js} +35 -35
- package/dist/component/{services-multi-choice-rac-C2e3xL9O.js → services-multi-choice-rac-CtBcc9WH.js} +12 -12
- package/dist/component/{signature-rac-Dj3aYMvJ.js → signature-rac-yvrHr1he.js} +102 -102
- package/dist/component/{submit-button-rac-C-BVXga7.js → submit-button-rac-s-JdZgq7.js} +2 -2
- package/dist/component/{tags-field-rac-CcOUcsCd.js → tags-field-rac-g_W0RMod.js} +66 -66
- package/dist/component/{tags-rac-p68DA4Mq.js → tags-rac-DmvIH6HU.js} +1 -1
- package/dist/component/{text-area-field-rac-DubIcKTn.js → text-area-field-rac-Duja5xOA.js} +27 -27
- package/dist/component/{text-area-rac-CygfUB6z.js → text-area-rac-DzRxgG6u.js} +1 -1
- package/dist/component/{text-input-field-rac-C7JZRcCX.js → text-input-field-rac-C2eXeoBC.js} +7 -7
- package/dist/component/{text-input-headless-D1xcxxNE.js → text-input-headless-d1WK0nqR.js} +3 -3
- package/dist/component/{text-input-rac-C5lfqJCN.js → text-input-rac-DM9MnoQs.js} +1 -1
- package/dist/component/{time-input-rac-BNxceC-R.js → time-input-rac-CxVZ3USX.js} +25 -25
- package/dist/component/{url-input-field-rac-DH_STwmd.js → url-input-field-rac-4oVJMr1a.js} +19 -19
- package/dist/component/{url-input-rac-C2VOzCis.js → url-input-rac--T-FnskQ.js} +1 -1
- package/dist/component/use-dropdown-option-class-name-BFHRYpVL.js +21 -0
- package/dist/component/{use-element-state-class-name-CITSBXT8.js → use-element-state-class-name-De5YnxMK.js} +1 -1
- package/dist/component/use-is-forced-open-dropdown-CWvcd9Ex.js +41 -0
- package/dist/component/{use-service-options-base-DVBmOiRh.js → use-service-options-base-CD1EVWRE.js} +1 -1
- package/dist/component/{use-text-input-class-name-COw61iUf.js → use-text-input-class-name-BYwXccvO.js} +3 -3
- package/package.json +4 -3
- package/dist/component/date-picker-field-rac-Wxmz-O7r.js +0 -304
- package/dist/component/events-repeater-rac-bp8gFHXQ.js +0 -256
- package/dist/component/use-dropdown-option-class-name-CKRu4ERM.js +0 -57
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import e, { useMemo as y, useCallback as H, useRef as T } from "react";
|
|
2
2
|
import { RicosViewer as k } from "@wix/ricos/viewer";
|
|
3
3
|
import I from "classnames";
|
|
4
|
-
import { ak as C, ah as G, ac as x, am as
|
|
4
|
+
import { ak as C, ah as G, ac as x, am as P, ad as B } from "./form-9WmwgGNc.js";
|
|
5
5
|
import { CheckboxGroup as q, CheckboxField as U, CheckboxButton as w } from "react-aria-components";
|
|
6
6
|
import { f as p, a as F } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { L as V, g as
|
|
8
|
-
import { D as
|
|
9
|
-
import { F as
|
|
10
|
-
import { E as
|
|
7
|
+
import { L as V, g as j } from "./field-label-headless-BibCD8xx.js";
|
|
8
|
+
import { D as z, E as K } from "./field-error-headless-B6x_cVEi.js";
|
|
9
|
+
import { F as Q } from "./fieldset-headless-CD3fds9J.js";
|
|
10
|
+
import { E as Y } from "./error-icon-hZxQ6DEy.js";
|
|
11
11
|
import { s as b } from "./field-rac.module-DobpyqOd.js";
|
|
12
|
-
import {
|
|
13
|
-
import { u as oe } from "./use-element-state-class-name-
|
|
12
|
+
import { C as $, S as J, v as W, x as X, r as Z, j as ee, w as te, F as f } from "./form-element-classes-BtKlobUX.js";
|
|
13
|
+
import { u as oe } from "./use-element-state-class-name-De5YnxMK.js";
|
|
14
14
|
const o = ({ children: t }) => {
|
|
15
15
|
const { id: s, value: n, onChange: a, disabled: l, readOnly: i, required: r, onBlur: c, onFocus: m, hasError: E, FieldLayout: L } = C(), { inputId: g, labelId: _, ariaDescribedBy: O } = G(), R = p(t, o.Label), N = p(t, o.Options), S = p(t, o.Description), A = p(t, o.Error), D = y(() => n || [], [
|
|
16
16
|
n
|
|
@@ -22,7 +22,7 @@ const o = ({ children: t }) => {
|
|
|
22
22
|
return /* @__PURE__ */ e.createElement(L, {
|
|
23
23
|
fieldId: s,
|
|
24
24
|
renderLabel: () => R,
|
|
25
|
-
renderInput: () => /* @__PURE__ */ e.createElement(
|
|
25
|
+
renderInput: () => /* @__PURE__ */ e.createElement(Q, {
|
|
26
26
|
id: g,
|
|
27
27
|
ariaLabelledBy: _,
|
|
28
28
|
ariaDescribedBy: O,
|
|
@@ -56,7 +56,7 @@ const o = ({ children: t }) => {
|
|
|
56
56
|
className: t
|
|
57
57
|
}), ne = ({ className: t, ...s }) => {
|
|
58
58
|
var m, E;
|
|
59
|
-
const { option: n } = s, { choiceImageResize: a, choiceImageAlignment: l } = C(), i = (m = n.media) == null ? void 0 : m.image, r = i &&
|
|
59
|
+
const { option: n } = s, { choiceImageResize: a, choiceImageAlignment: l } = C(), i = (m = n.media) == null ? void 0 : m.image, r = i && j(i, i.width, i.height);
|
|
60
60
|
if (!i || !r)
|
|
61
61
|
return /* @__PURE__ */ e.createElement("div", {
|
|
62
62
|
className: t,
|
|
@@ -79,7 +79,7 @@ const o = ({ children: t }) => {
|
|
|
79
79
|
}, n.label);
|
|
80
80
|
}, u = ({ children: t, className: s, ...n }) => {
|
|
81
81
|
const { option: a, isFirst: l = !1, fieldId: i } = n, { disabled: r, readOnly: c, hasError: m } = C(), E = T(null);
|
|
82
|
-
|
|
82
|
+
P(() => {
|
|
83
83
|
var O;
|
|
84
84
|
l && ((O = E.current) == null || O.focus({
|
|
85
85
|
preventScroll: !0
|
|
@@ -108,8 +108,8 @@ u.Label = se;
|
|
|
108
108
|
o.Label = V;
|
|
109
109
|
o.Options = h;
|
|
110
110
|
h.Option = u;
|
|
111
|
-
o.Description =
|
|
112
|
-
o.Error =
|
|
111
|
+
o.Description = z;
|
|
112
|
+
o.Error = K;
|
|
113
113
|
const ie = "_options_h283c_1", le = "_optionInput_h283c_25", re = "_option_h283c_1", ce = "_optionHover_h283c_61", me = "_optionSelected_h283c_61", pe = "_optionLabel_h283c_101", Ee = "_optionImage_h283c_132", d = {
|
|
114
114
|
options: ie,
|
|
115
115
|
optionInput: le,
|
|
@@ -129,9 +129,9 @@ const ie = "_options_h283c_1", le = "_optionInput_h283c_25", re = "_option_h283c
|
|
|
129
129
|
const t = oe({
|
|
130
130
|
globalClasses: te,
|
|
131
131
|
moduleClasses: ue
|
|
132
|
-
}), s =
|
|
132
|
+
}), s = B(f.IMAGE_CHOICE, f.IMAGE_CHOICE_OPTION, f.IMAGE_CHOICE_OPTION_IMAGE);
|
|
133
133
|
return /* @__PURE__ */ e.createElement(o, null, /* @__PURE__ */ e.createElement(o.Label, {
|
|
134
|
-
className: I(
|
|
134
|
+
className: I($, b.label)
|
|
135
135
|
}, /* @__PURE__ */ e.createElement(o.Label.Required, {
|
|
136
136
|
className: I(J, b.requiredMark)
|
|
137
137
|
})), /* @__PURE__ */ e.createElement(o.Options, {
|
|
@@ -149,7 +149,7 @@ const ie = "_options_h283c_1", le = "_optionInput_h283c_25", re = "_option_h283c
|
|
|
149
149
|
className: d.optionLabel
|
|
150
150
|
}))), /* @__PURE__ */ e.createElement(o.Error, {
|
|
151
151
|
className: I(Z, b.error)
|
|
152
|
-
}, /* @__PURE__ */ e.createElement(
|
|
152
|
+
}, /* @__PURE__ */ e.createElement(Y, null), /* @__PURE__ */ e.createElement(o.Error.Text, null)), /* @__PURE__ */ e.createElement(o.Description, {
|
|
153
153
|
className: I(ee, b.description)
|
|
154
154
|
}, de));
|
|
155
155
|
}, De = () => /* @__PURE__ */ e.createElement(Ie, null);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a3 as n } from "./form-
|
|
2
|
-
import { A as S, a as p, C as N, M as g, H as q, J as D, a5 as L } from "./form-
|
|
1
|
+
import { a3 as n } from "./form-9WmwgGNc.js";
|
|
2
|
+
import { A as S, a as p, C as N, M as g, H as q, J as D, a5 as L } from "./form-9WmwgGNc.js";
|
|
3
3
|
const l = (e = !1) => ({
|
|
4
4
|
country: {
|
|
5
5
|
required: e
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { d as R, V as _, T as de, t as O, g as Ge, B as Be, N as qe, I as He, m as A, P as Ee, w as re, S as Fe, b as B, n as M, a4 as Te, p as je, o as he, q } from "./form-
|
|
2
|
-
import { $ as Mn } from "./form-
|
|
1
|
+
import { d as R, V as _, T as de, t as O, g as Ge, B as Be, N as qe, I as He, m as A, P as Ee, w as re, S as Fe, b as B, n as M, a4 as Te, p as je, o as he, q } from "./form-9WmwgGNc.js";
|
|
2
|
+
import { $ as Mn } from "./form-9WmwgGNc.js";
|
|
3
3
|
import Xe from "ajv";
|
|
4
4
|
import ke from "ajv-errors";
|
|
5
5
|
import We from "ajv-formats";
|
|
6
6
|
import Ke from "fast-deep-equal";
|
|
7
7
|
import { parsePhoneNumber as ze, parsePhoneNumberWithError as Ve, ParseError as Ze } from "libphonenumber-js/max";
|
|
8
8
|
import Je from "libphonenumber-js/metadata.max.json";
|
|
9
|
-
import { p as Qe, i as et } from "./date-availability
|
|
10
|
-
import { a as Sn } from "./date-availability
|
|
9
|
+
import { p as Qe, i as et } from "./date-availability-LN33GU7O.js";
|
|
10
|
+
import { a as Sn } from "./date-availability-LN33GU7O.js";
|
|
11
11
|
import { C as tt } from "./calling-country-codes-PyWuOTmF.js";
|
|
12
12
|
function rt(e) {
|
|
13
13
|
var t, r;
|
|
@@ -2,21 +2,22 @@ import { RicosViewer as X } from "@wix/ricos/viewer";
|
|
|
2
2
|
import L from "classnames";
|
|
3
3
|
import r, { useMemo as w, createContext as Ue, useContext as Ce, useState as be, useRef as x, useCallback as R, useEffect as Pe } from "react";
|
|
4
4
|
import { UNSAFE_PortalProvider as Pt } from "react-aria";
|
|
5
|
-
import { af as yt, c as Ct, aa as Tt, ac as It, H as Mt, J as qt, v as wt, G as V, F as K, au as Te, a3 as lt, ak as P, ah as T, am as ae, ag as Lt, T as xt, C as ve, a1 as Bt, a5 as kt, ar as $t, al as Wt, aq as Ut, a8 as Vt, Z as Kt, a7 as Yt, an as Ht, j as jt } from "./form-
|
|
5
|
+
import { af as yt, c as Ct, aa as Tt, ac as It, H as Mt, J as qt, v as wt, G as V, F as K, au as Te, a3 as lt, ak as P, ah as T, am as ae, ag as Lt, T as xt, C as ve, a1 as Bt, a5 as kt, ar as $t, al as Wt, aq as Ut, a8 as Vt, Z as Kt, a7 as Yt, an as Ht, j as jt } from "./form-9WmwgGNc.js";
|
|
6
6
|
import { f as E, a as F } from "./find-child-C60k4CxG.js";
|
|
7
7
|
import { F as Jt, V as Gt } from "./headless-styles-CmcyA_pi.js";
|
|
8
|
-
import {
|
|
9
|
-
import { TextField as fe, Input as le, ComboBoxStateContext as Ve, ComboBox as
|
|
10
|
-
import { D as ie, E as ce } from "./field-error-headless-
|
|
11
|
-
import { L as de } from "./field-label-headless-
|
|
12
|
-
import { e as
|
|
13
|
-
import { u as
|
|
8
|
+
import { u as Xt } from "./use-is-forced-open-dropdown-CWvcd9Ex.js";
|
|
9
|
+
import { TextField as fe, Input as le, ComboBoxStateContext as Ve, ComboBox as Se, Popover as De, ListBox as Re, ListBoxItem as Ae, Group as Nt, Button as gt } from "react-aria-components";
|
|
10
|
+
import { D as ie, E as ce } from "./field-error-headless-B6x_cVEi.js";
|
|
11
|
+
import { L as de } from "./field-label-headless-BibCD8xx.js";
|
|
12
|
+
import { e as zt, c as Qt, a as Zt, r as Ot } from "./isObjectLike-BN_BZMhy.js";
|
|
13
|
+
import { u as en } from "./use-invoke-callback-UH73A_J3.js";
|
|
14
14
|
import { C as it } from "./chevron-down-icon-CcpVm6B-.js";
|
|
15
15
|
import { E as z } from "./error-icon-hZxQ6DEy.js";
|
|
16
16
|
import { H as Me } from "./custom-focus-class-_483Pkwp.js";
|
|
17
17
|
import { s as C } from "./field-rac.module-DobpyqOd.js";
|
|
18
|
-
import {
|
|
19
|
-
import { u as
|
|
18
|
+
import { C as Q, S as Z, n as ct, E as ge, r as ee, j as te } from "./form-element-classes-BtKlobUX.js";
|
|
19
|
+
import { u as tn } from "./use-dropdown-option-class-name-BFHRYpVL.js";
|
|
20
|
+
import { u as nn } from "./use-text-input-class-name-BYwXccvO.js";
|
|
20
21
|
const rn = (e, t, o) => {
|
|
21
22
|
var l, a, i, s;
|
|
22
23
|
const n = (l = e.steps) == null ? void 0 : l.map((d) => {
|
|
@@ -183,7 +184,7 @@ const cn = (e, t) => e.map((o) => ({
|
|
|
183
184
|
}, [
|
|
184
185
|
i,
|
|
185
186
|
s
|
|
186
|
-
]),
|
|
187
|
+
]), D = w(() => qt(), []);
|
|
187
188
|
return {
|
|
188
189
|
form: w(() => {
|
|
189
190
|
var _, g;
|
|
@@ -199,7 +200,7 @@ const cn = (e, t) => e.map((o) => ({
|
|
|
199
200
|
includeHiddenFields: !0,
|
|
200
201
|
isMobile: I,
|
|
201
202
|
breakpoint: b,
|
|
202
|
-
form: ln(rn(p, N,
|
|
203
|
+
form: ln(rn(p, N, D), a, (g = (_ = i == null ? void 0 : i.predefined) == null ? void 0 : _.multilineAddressOptions) == null ? void 0 : g.fields)
|
|
203
204
|
});
|
|
204
205
|
if (!O.fields.some((v) => v.properties.hidden))
|
|
205
206
|
return O;
|
|
@@ -216,7 +217,7 @@ const cn = (e, t) => e.map((o) => ({
|
|
|
216
217
|
i,
|
|
217
218
|
t,
|
|
218
219
|
N,
|
|
219
|
-
|
|
220
|
+
D,
|
|
220
221
|
f,
|
|
221
222
|
u,
|
|
222
223
|
e,
|
|
@@ -225,18 +226,18 @@ const cn = (e, t) => e.map((o) => ({
|
|
|
225
226
|
]),
|
|
226
227
|
isMultilineAddressField: f
|
|
227
228
|
};
|
|
228
|
-
},
|
|
229
|
+
}, St = /* @__PURE__ */ Ue(void 0), Cn = ({ children: e, fields: t }) => {
|
|
229
230
|
const o = w(() => ({
|
|
230
231
|
fields: t
|
|
231
232
|
}), [
|
|
232
233
|
t
|
|
233
234
|
]);
|
|
234
|
-
return /* @__PURE__ */ r.createElement(
|
|
235
|
+
return /* @__PURE__ */ r.createElement(St.Provider, {
|
|
235
236
|
value: o
|
|
236
237
|
}, e);
|
|
237
238
|
};
|
|
238
239
|
function ue(e) {
|
|
239
|
-
const t = Ce(
|
|
240
|
+
const t = Ce(St);
|
|
240
241
|
if (!t)
|
|
241
242
|
throw new Error("useAddressFields must be used within AddressFieldsProvider");
|
|
242
243
|
return t.fields[e];
|
|
@@ -313,7 +314,7 @@ var we, dt;
|
|
|
313
314
|
function Ln() {
|
|
314
315
|
if (dt) return we;
|
|
315
316
|
dt = 1;
|
|
316
|
-
var e =
|
|
317
|
+
var e = zt(), t = function() {
|
|
317
318
|
return e.Date.now();
|
|
318
319
|
};
|
|
319
320
|
return we = t, we;
|
|
@@ -344,7 +345,7 @@ var ke, pt;
|
|
|
344
345
|
function On() {
|
|
345
346
|
if (pt) return ke;
|
|
346
347
|
pt = 1;
|
|
347
|
-
var e =
|
|
348
|
+
var e = Qt(), t = Zt(), o = "[object Symbol]";
|
|
348
349
|
function n(l) {
|
|
349
350
|
return typeof l == "symbol" || t(l) && e(l) == o;
|
|
350
351
|
}
|
|
@@ -378,33 +379,33 @@ function Fn() {
|
|
|
378
379
|
bt = 1;
|
|
379
380
|
var e = Ot(), t = Ln(), o = vn(), n = "Expected a function", l = Math.max, a = Math.min;
|
|
380
381
|
function i(s, d, m) {
|
|
381
|
-
var u, y, I, b, p, f, N = 0,
|
|
382
|
+
var u, y, I, b, p, f, N = 0, D = !1, h = !1, O = !0;
|
|
382
383
|
if (typeof s != "function")
|
|
383
384
|
throw new TypeError(n);
|
|
384
|
-
d = o(d) || 0, e(m) && (
|
|
385
|
-
function A(
|
|
385
|
+
d = o(d) || 0, e(m) && (D = !!m.leading, h = "maxWait" in m, I = h ? l(o(m.maxWait) || 0, d) : I, O = "trailing" in m ? !!m.trailing : O);
|
|
386
|
+
function A(S) {
|
|
386
387
|
var J = u, Ee = y;
|
|
387
|
-
return u = y = void 0, N =
|
|
388
|
+
return u = y = void 0, N = S, b = s.apply(Ee, J), b;
|
|
388
389
|
}
|
|
389
|
-
function M(
|
|
390
|
-
return N =
|
|
390
|
+
function M(S) {
|
|
391
|
+
return N = S, p = setTimeout(v, d), D ? A(S) : b;
|
|
391
392
|
}
|
|
392
|
-
function _(
|
|
393
|
-
var J =
|
|
393
|
+
function _(S) {
|
|
394
|
+
var J = S - f, Ee = S - N, Ne = d - J;
|
|
394
395
|
return h ? a(Ne, I - Ee) : Ne;
|
|
395
396
|
}
|
|
396
|
-
function g(
|
|
397
|
-
var J =
|
|
397
|
+
function g(S) {
|
|
398
|
+
var J = S - f, Ee = S - N;
|
|
398
399
|
return f === void 0 || J >= d || J < 0 || h && Ee >= I;
|
|
399
400
|
}
|
|
400
401
|
function v() {
|
|
401
|
-
var
|
|
402
|
-
if (g(
|
|
403
|
-
return me(
|
|
404
|
-
p = setTimeout(v, _(
|
|
402
|
+
var S = t();
|
|
403
|
+
if (g(S))
|
|
404
|
+
return me(S);
|
|
405
|
+
p = setTimeout(v, _(S));
|
|
405
406
|
}
|
|
406
|
-
function me(
|
|
407
|
-
return p = void 0, O && u ? A(
|
|
407
|
+
function me(S) {
|
|
408
|
+
return p = void 0, O && u ? A(S) : (u = y = void 0, b);
|
|
408
409
|
}
|
|
409
410
|
function j() {
|
|
410
411
|
p !== void 0 && clearTimeout(p), N = 0, u = f = y = p = void 0;
|
|
@@ -413,8 +414,8 @@ function Fn() {
|
|
|
413
414
|
return p === void 0 ? b : me(t());
|
|
414
415
|
}
|
|
415
416
|
function q() {
|
|
416
|
-
var
|
|
417
|
-
if (u = arguments, y = this, f =
|
|
417
|
+
var S = t(), J = g(S);
|
|
418
|
+
if (u = arguments, y = this, f = S, J) {
|
|
418
419
|
if (p === void 0)
|
|
419
420
|
return M(f);
|
|
420
421
|
if (h)
|
|
@@ -427,8 +428,8 @@ function Fn() {
|
|
|
427
428
|
return We = i, We;
|
|
428
429
|
}
|
|
429
430
|
var hn = Fn();
|
|
430
|
-
const
|
|
431
|
-
const n = x(e), l = R(
|
|
431
|
+
const Sn = /* @__PURE__ */ xt(hn), Dn = (e, t, o = 200) => {
|
|
432
|
+
const n = x(e), l = R(Sn((...a) => {
|
|
432
433
|
n.current(...a);
|
|
433
434
|
}, o), [
|
|
434
435
|
o
|
|
@@ -447,10 +448,10 @@ const Dn = /* @__PURE__ */ xt(hn), Sn = (e, t, o = 200) => {
|
|
|
447
448
|
}, ft = {
|
|
448
449
|
loading: !1,
|
|
449
450
|
predictions: []
|
|
450
|
-
},
|
|
451
|
+
}, Dt = ({ atlas: e, onError: t }) => {
|
|
451
452
|
const [{ loading: n, predictions: l }, a] = be(ft), i = x(0), s = Rn(), d = R(() => {
|
|
452
453
|
i.current++, a(ft);
|
|
453
|
-
}, []), m =
|
|
454
|
+
}, []), m = Dn(async ({ input: u, countryCodes: y }) => {
|
|
454
455
|
if (!e || !s())
|
|
455
456
|
return;
|
|
456
457
|
if (!u) {
|
|
@@ -501,7 +502,7 @@ const Dn = /* @__PURE__ */ xt(hn), Sn = (e, t, o = 200) => {
|
|
|
501
502
|
e
|
|
502
503
|
]), null;
|
|
503
504
|
}, k = ({ children: e }) => {
|
|
504
|
-
const { id: t, value: o, onChange: n, disabled: l, readOnly: a, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: I } = T(), { autocompleteEnabled: b } = Ie(), p = y || b, f = pe("addressLine1"), N = E(e, k.Label),
|
|
505
|
+
const { id: t, value: o, onChange: n, disabled: l, readOnly: a, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: I } = T(), { autocompleteEnabled: b } = Ie(), p = y || b, f = pe("addressLine1"), N = E(e, k.Label), D = E(e, k.Input), h = E(e, k.Options), O = E(e, k.Description), A = E(e, k.Error);
|
|
505
506
|
return p ? /* @__PURE__ */ r.createElement(u, {
|
|
506
507
|
fieldId: t,
|
|
507
508
|
renderLabel: () => F(N, {
|
|
@@ -516,7 +517,7 @@ const Dn = /* @__PURE__ */ xt(hn), Sn = (e, t, o = 200) => {
|
|
|
516
517
|
hasError: s,
|
|
517
518
|
onBlur: d,
|
|
518
519
|
onFocus: m
|
|
519
|
-
},
|
|
520
|
+
}, D, h),
|
|
520
521
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, A, O)
|
|
521
522
|
}) : /* @__PURE__ */ r.createElement(u, {
|
|
522
523
|
fieldId: t,
|
|
@@ -533,20 +534,20 @@ const Dn = /* @__PURE__ */ xt(hn), Sn = (e, t, o = 200) => {
|
|
|
533
534
|
isInvalid: s,
|
|
534
535
|
onBlur: d,
|
|
535
536
|
onFocus: m
|
|
536
|
-
},
|
|
537
|
+
}, D),
|
|
537
538
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, A, O)
|
|
538
539
|
});
|
|
539
540
|
}, An = ({ children: e, value: t, onChange: o, disabled: n, readOnly: l, required: a, hasError: i, onBlur: s, onFocus: d }) => {
|
|
540
541
|
const { labelId: m } = T(), { onAddressSelect: u } = Ie(), y = Le(), I = Ke({
|
|
541
542
|
enabled: !0
|
|
542
|
-
}), { predictions: b, updatePredictions: p, clearPredictions: f } =
|
|
543
|
+
}), { predictions: b, updatePredictions: p, clearPredictions: f } = Dt({
|
|
543
544
|
atlas: I
|
|
544
545
|
}), N = w(() => b.map((g) => ({
|
|
545
546
|
id: g.searchId || "",
|
|
546
547
|
label: g.description || ""
|
|
547
548
|
})), [
|
|
548
549
|
b
|
|
549
|
-
]),
|
|
550
|
+
]), D = R((g) => {
|
|
550
551
|
p({
|
|
551
552
|
input: g,
|
|
552
553
|
countryCodes: y ? [
|
|
@@ -579,10 +580,10 @@ const Dn = /* @__PURE__ */ xt(hn), Sn = (e, t, o = 200) => {
|
|
|
579
580
|
}, [
|
|
580
581
|
d
|
|
581
582
|
]), M = E(e, k.Input), _ = E(e, k.Options);
|
|
582
|
-
return /* @__PURE__ */ r.createElement(
|
|
583
|
+
return /* @__PURE__ */ r.createElement(Se, {
|
|
583
584
|
"aria-labelledby": m,
|
|
584
585
|
inputValue: t ?? "",
|
|
585
|
-
onInputChange:
|
|
586
|
+
onInputChange: D,
|
|
586
587
|
value: null,
|
|
587
588
|
onChange: h,
|
|
588
589
|
isDisabled: n,
|
|
@@ -616,7 +617,7 @@ const Dn = /* @__PURE__ */ xt(hn), Sn = (e, t, o = 200) => {
|
|
|
616
617
|
});
|
|
617
618
|
}, He = ({ children: e, className: t }) => {
|
|
618
619
|
const o = E(e, He.Option);
|
|
619
|
-
return /* @__PURE__ */ r.createElement(
|
|
620
|
+
return /* @__PURE__ */ r.createElement(De, {
|
|
620
621
|
className: t,
|
|
621
622
|
containerPadding: 0,
|
|
622
623
|
offset: 0
|
|
@@ -641,7 +642,7 @@ k.Options = He;
|
|
|
641
642
|
k.Description = ie;
|
|
642
643
|
k.Error = ce;
|
|
643
644
|
const re = ({ children: e }) => {
|
|
644
|
-
const { id: t, value: o, onChange: n, disabled: l, readOnly: a, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: y } = T(), { t: I } = Te(), b = I("field.mla-apartment.label"), p = E(e, re.Label), f = E(e, re.Input), N = E(e, re.Description),
|
|
645
|
+
const { id: t, value: o, onChange: n, disabled: l, readOnly: a, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: y } = T(), { t: I } = Te(), b = I("field.mla-apartment.label"), p = E(e, re.Label), f = E(e, re.Input), N = E(e, re.Description), D = E(e, re.Error);
|
|
645
646
|
return /* @__PURE__ */ r.createElement(u, {
|
|
646
647
|
fieldId: t,
|
|
647
648
|
renderLabel: () => F(p, {
|
|
@@ -658,7 +659,7 @@ const re = ({ children: e }) => {
|
|
|
658
659
|
onBlur: d,
|
|
659
660
|
onFocus: m
|
|
660
661
|
}, f),
|
|
661
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null,
|
|
662
|
+
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, D, N)
|
|
662
663
|
});
|
|
663
664
|
}, Tn = ({ className: e }) => {
|
|
664
665
|
const { id: t, placeholder: o } = P(), { inputId: n, ariaDescribedBy: l } = T(), a = x(null);
|
|
@@ -732,7 +733,7 @@ const qn = ({ isOpen: e }) => {
|
|
|
732
733
|
t
|
|
733
734
|
]);
|
|
734
735
|
}, wn = (e, t) => e.find((o) => o.label.toLocaleLowerCase() === t.toLocaleLowerCase().trim()), At = ({ options: e, value: t, commit: o, clear: n, onBlur: l }) => {
|
|
735
|
-
const [a, i] = be(null), s =
|
|
736
|
+
const [a, i] = be(null), s = en(l), d = w(() => {
|
|
736
737
|
var b;
|
|
737
738
|
return t ? ((b = e.find((p) => p.value === t)) == null ? void 0 : b.label) ?? "" : "";
|
|
738
739
|
}, [
|
|
@@ -775,10 +776,10 @@ const qn = ({ isOpen: e }) => {
|
|
|
775
776
|
onInputKeyDown: y
|
|
776
777
|
};
|
|
777
778
|
}, Y = ({ children: e, ...t }) => {
|
|
778
|
-
const { isForcedOpen: o = !1 } = t, { id: n, value: l, onChange: a, disabled: i, readOnly: s, required: d, hasError: m, onBlur: u, onFocus: y, FieldLayout: I, options: b } = P(), { labelId: p } = T(), { t: f } = Te(), { language: N } = It(),
|
|
779
|
-
value:
|
|
780
|
-
label: f(`locale-dataset.countries.${ve[
|
|
781
|
-
}), q), []).sort((q,
|
|
779
|
+
const { isForcedOpen: o = !1 } = t, { id: n, value: l, onChange: a, disabled: i, readOnly: s, required: d, hasError: m, onBlur: u, onFocus: y, FieldLayout: I, options: b } = P(), { labelId: p } = T(), { t: f } = Te(), { language: N } = It(), D = w(() => (b || []).reduce((q, S) => (S.value && ve.hasOwnProperty(S.value) && q.push({
|
|
780
|
+
value: S.value,
|
|
781
|
+
label: f(`locale-dataset.countries.${ve[S.value].toUpperCase()}`)
|
|
782
|
+
}), q), []).sort((q, S) => q.label.localeCompare(S.label, N)), [
|
|
782
783
|
b,
|
|
783
784
|
f,
|
|
784
785
|
N
|
|
@@ -787,7 +788,7 @@ const qn = ({ isOpen: e }) => {
|
|
|
787
788
|
]), O = R(() => h(""), [
|
|
788
789
|
h
|
|
789
790
|
]), { onInputKeyDown: A, ...M } = At({
|
|
790
|
-
options:
|
|
791
|
+
options: D,
|
|
791
792
|
value: l,
|
|
792
793
|
commit: h,
|
|
793
794
|
clear: O,
|
|
@@ -798,7 +799,7 @@ const qn = ({ isOpen: e }) => {
|
|
|
798
799
|
renderLabel: () => F(g, {
|
|
799
800
|
label: _
|
|
800
801
|
}),
|
|
801
|
-
renderInput: () => /* @__PURE__ */ r.createElement(
|
|
802
|
+
renderInput: () => /* @__PURE__ */ r.createElement(Se, {
|
|
802
803
|
"aria-labelledby": p,
|
|
803
804
|
...M,
|
|
804
805
|
isDisabled: i,
|
|
@@ -810,7 +811,7 @@ const qn = ({ isOpen: e }) => {
|
|
|
810
811
|
}, F(v, {
|
|
811
812
|
onKeyDown: A
|
|
812
813
|
}), F(me, {
|
|
813
|
-
options:
|
|
814
|
+
options: D
|
|
814
815
|
}), /* @__PURE__ */ r.createElement(qn, {
|
|
815
816
|
isOpen: o
|
|
816
817
|
})),
|
|
@@ -849,7 +850,7 @@ Fe.Input = xn;
|
|
|
849
850
|
Fe.Trigger = Bn;
|
|
850
851
|
const je = ({ children: e, className: t, ...o }) => {
|
|
851
852
|
const { options: n } = o, l = E(e, je.Option);
|
|
852
|
-
return /* @__PURE__ */ r.createElement(
|
|
853
|
+
return /* @__PURE__ */ r.createElement(De, {
|
|
853
854
|
className: t,
|
|
854
855
|
containerPadding: 0,
|
|
855
856
|
offset: 0
|
|
@@ -910,11 +911,11 @@ function Un({ isAutocompleteEnabled: e }) {
|
|
|
910
911
|
};
|
|
911
912
|
}
|
|
912
913
|
const $ = ({ children: e }) => {
|
|
913
|
-
const { id: t, value: o, onChange: n, disabled: l, readOnly: a, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: I } = T(), b = Le(), { autocompleteEnabled: p } = Ie(), f = !!(b && ve[b] === ve.JP), N = (y || p) && f,
|
|
914
|
+
const { id: t, value: o, onChange: n, disabled: l, readOnly: a, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: I } = T(), b = Le(), { autocompleteEnabled: p } = Ie(), f = !!(b && ve[b] === ve.JP), N = (y || p) && f, D = pe("zipCode"), h = E(e, $.Label), O = E(e, $.Control), A = E(e, $.Options), M = E(e, $.Description), _ = E(e, $.Error);
|
|
914
915
|
return N ? /* @__PURE__ */ r.createElement(u, {
|
|
915
916
|
fieldId: t,
|
|
916
917
|
renderLabel: () => F(h, {
|
|
917
|
-
label:
|
|
918
|
+
label: D
|
|
918
919
|
}),
|
|
919
920
|
renderInput: () => /* @__PURE__ */ r.createElement(Vn, {
|
|
920
921
|
value: o,
|
|
@@ -930,7 +931,7 @@ const $ = ({ children: e }) => {
|
|
|
930
931
|
}) : /* @__PURE__ */ r.createElement(u, {
|
|
931
932
|
fieldId: t,
|
|
932
933
|
renderLabel: () => F(h, {
|
|
933
|
-
label:
|
|
934
|
+
label: D
|
|
934
935
|
}),
|
|
935
936
|
renderInput: () => /* @__PURE__ */ r.createElement(fe, {
|
|
936
937
|
"aria-labelledby": I,
|
|
@@ -955,7 +956,7 @@ const $ = ({ children: e }) => {
|
|
|
955
956
|
}
|
|
956
957
|
] : [], [
|
|
957
958
|
p
|
|
958
|
-
]),
|
|
959
|
+
]), D = R(async (g) => {
|
|
959
960
|
o(g);
|
|
960
961
|
const v = await b(g ?? "");
|
|
961
962
|
f(v);
|
|
@@ -976,10 +977,10 @@ const $ = ({ children: e }) => {
|
|
|
976
977
|
}, [
|
|
977
978
|
d
|
|
978
979
|
]), M = E(e, $.Control), _ = E(e, $.Options);
|
|
979
|
-
return /* @__PURE__ */ r.createElement(
|
|
980
|
+
return /* @__PURE__ */ r.createElement(Se, {
|
|
980
981
|
"aria-labelledby": m,
|
|
981
982
|
inputValue: t ?? "",
|
|
982
|
-
onInputChange:
|
|
983
|
+
onInputChange: D,
|
|
983
984
|
value: null,
|
|
984
985
|
onChange: h,
|
|
985
986
|
isDisabled: n,
|
|
@@ -1023,7 +1024,7 @@ const $ = ({ children: e }) => {
|
|
|
1023
1024
|
});
|
|
1024
1025
|
}, Ge = ({ children: e, className: t }) => {
|
|
1025
1026
|
const o = E(e, Ge.Option);
|
|
1026
|
-
return /* @__PURE__ */ r.createElement(
|
|
1027
|
+
return /* @__PURE__ */ r.createElement(De, {
|
|
1027
1028
|
className: t,
|
|
1028
1029
|
containerPadding: 0,
|
|
1029
1030
|
offset: 0
|
|
@@ -1049,7 +1050,7 @@ $.Options = Ge;
|
|
|
1049
1050
|
$.Description = ie;
|
|
1050
1051
|
$.Error = ce;
|
|
1051
1052
|
const W = ({ children: e }) => {
|
|
1052
|
-
const { id: t, value: o, onChange: n, disabled: l, readOnly: a, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: I } = T(), { autocompleteEnabled: b } = Ie(), p = y || b, f = pe("streetName"), N = E(e, W.Label),
|
|
1053
|
+
const { id: t, value: o, onChange: n, disabled: l, readOnly: a, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: I } = T(), { autocompleteEnabled: b } = Ie(), p = y || b, f = pe("streetName"), N = E(e, W.Label), D = E(e, W.Input), h = E(e, W.Options), O = E(e, W.Description), A = E(e, W.Error);
|
|
1053
1054
|
return p ? /* @__PURE__ */ r.createElement(u, {
|
|
1054
1055
|
fieldId: t,
|
|
1055
1056
|
renderLabel: () => F(N, {
|
|
@@ -1064,7 +1065,7 @@ const W = ({ children: e }) => {
|
|
|
1064
1065
|
hasError: s,
|
|
1065
1066
|
onBlur: d,
|
|
1066
1067
|
onFocus: m
|
|
1067
|
-
},
|
|
1068
|
+
}, D, h),
|
|
1068
1069
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, A, O)
|
|
1069
1070
|
}) : /* @__PURE__ */ r.createElement(u, {
|
|
1070
1071
|
fieldId: t,
|
|
@@ -1081,15 +1082,15 @@ const W = ({ children: e }) => {
|
|
|
1081
1082
|
isInvalid: s,
|
|
1082
1083
|
onBlur: d,
|
|
1083
1084
|
onFocus: m
|
|
1084
|
-
},
|
|
1085
|
+
}, D),
|
|
1085
1086
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, A, O)
|
|
1086
1087
|
});
|
|
1087
1088
|
}, Hn = ({ children: e, value: t, onChange: o, disabled: n, readOnly: l, required: a, hasError: i, onBlur: s, onFocus: d }) => {
|
|
1088
1089
|
const { labelId: m } = T(), { onAddressSelect: u } = Ie(), y = Le(), I = Ke({
|
|
1089
1090
|
enabled: !0
|
|
1090
|
-
}), { predictions: b, updatePredictions: p, clearPredictions: f } =
|
|
1091
|
+
}), { predictions: b, updatePredictions: p, clearPredictions: f } = Dt({
|
|
1091
1092
|
atlas: I
|
|
1092
|
-
}), N = E(e, W.Input),
|
|
1093
|
+
}), N = E(e, W.Input), D = E(e, W.Options), h = w(() => b.reduce((g, v) => (v.searchId && v.description && g.push({
|
|
1093
1094
|
id: v.searchId,
|
|
1094
1095
|
label: v.description
|
|
1095
1096
|
}), g), []), [
|
|
@@ -1126,7 +1127,7 @@ const W = ({ children: e }) => {
|
|
|
1126
1127
|
}, [
|
|
1127
1128
|
d
|
|
1128
1129
|
]);
|
|
1129
|
-
return /* @__PURE__ */ r.createElement(
|
|
1130
|
+
return /* @__PURE__ */ r.createElement(Se, {
|
|
1130
1131
|
"aria-labelledby": m,
|
|
1131
1132
|
inputValue: t ?? "",
|
|
1132
1133
|
onInputChange: O,
|
|
@@ -1143,7 +1144,7 @@ const W = ({ children: e }) => {
|
|
|
1143
1144
|
items: h
|
|
1144
1145
|
}, F(N, {
|
|
1145
1146
|
onFocus: _
|
|
1146
|
-
}), F(
|
|
1147
|
+
}), F(D, {
|
|
1147
1148
|
options: h
|
|
1148
1149
|
}), /* @__PURE__ */ r.createElement(Ye, {
|
|
1149
1150
|
optionCount: h.length
|
|
@@ -1163,7 +1164,7 @@ const W = ({ children: e }) => {
|
|
|
1163
1164
|
});
|
|
1164
1165
|
}, Xe = ({ children: e, className: t }) => {
|
|
1165
1166
|
const o = E(e, Xe.Option);
|
|
1166
|
-
return /* @__PURE__ */ r.createElement(
|
|
1167
|
+
return /* @__PURE__ */ r.createElement(De, {
|
|
1167
1168
|
className: t,
|
|
1168
1169
|
containerPadding: 0,
|
|
1169
1170
|
offset: 0
|
|
@@ -1230,18 +1231,18 @@ const H = ({ children: e }) => {
|
|
|
1230
1231
|
return (kt(((B = f == null ? void 0 : f.subdivisions) == null ? void 0 : B.list) || [], p) || []).map((q) => ({
|
|
1231
1232
|
value: q.key,
|
|
1232
1233
|
label: I(q.displayName)
|
|
1233
|
-
})).sort((q,
|
|
1234
|
+
})).sort((q, S) => q.label.localeCompare(S.label));
|
|
1234
1235
|
}, [
|
|
1235
1236
|
p,
|
|
1236
1237
|
I,
|
|
1237
1238
|
f
|
|
1238
|
-
]),
|
|
1239
|
+
]), D = R(() => n(""), [
|
|
1239
1240
|
n
|
|
1240
1241
|
]), { onInputKeyDown: h, ...O } = At({
|
|
1241
1242
|
options: N,
|
|
1242
1243
|
value: o,
|
|
1243
1244
|
commit: n,
|
|
1244
|
-
clear:
|
|
1245
|
+
clear: D,
|
|
1245
1246
|
onBlur: d
|
|
1246
1247
|
}), A = pe("subdivision"), M = E(e, H.Label), _ = E(e, H.Control), g = E(e, H.Options), v = E(e, H.Description), me = E(e, H.Error);
|
|
1247
1248
|
return /* @__PURE__ */ r.createElement(u, {
|
|
@@ -1249,7 +1250,7 @@ const H = ({ children: e }) => {
|
|
|
1249
1250
|
renderLabel: () => F(M, {
|
|
1250
1251
|
label: A
|
|
1251
1252
|
}),
|
|
1252
|
-
renderInput: () => /* @__PURE__ */ r.createElement(
|
|
1253
|
+
renderInput: () => /* @__PURE__ */ r.createElement(Se, {
|
|
1253
1254
|
"aria-labelledby": y,
|
|
1254
1255
|
...O,
|
|
1255
1256
|
isDisabled: l,
|
|
@@ -1298,7 +1299,7 @@ he.Input = Xn;
|
|
|
1298
1299
|
he.Trigger = zn;
|
|
1299
1300
|
const ze = ({ children: e, className: t, ...o }) => {
|
|
1300
1301
|
const { options: n } = o, l = E(e, ze.Option);
|
|
1301
|
-
return /* @__PURE__ */ r.createElement(
|
|
1302
|
+
return /* @__PURE__ */ r.createElement(De, {
|
|
1302
1303
|
className: t,
|
|
1303
1304
|
containerPadding: 0,
|
|
1304
1305
|
offset: 0
|
|
@@ -1332,7 +1333,7 @@ const Zn = () => ue("country"), er = () => ue("subdivision"), tr = () => ue("cit
|
|
|
1332
1333
|
[K.MLA_STREET_NUMBER]: ar,
|
|
1333
1334
|
[K.MLA_APARTMENT]: lr
|
|
1334
1335
|
}, cr = {}, dr = [], c = ({ children: e }) => {
|
|
1335
|
-
const { id: t, form: o, value: n, onChange: l, onFieldBlur: a, onFieldFocus: i, errors: s, FieldLayout: d, fieldSettings: m, label: u, validation: y, target: I, autocompleteEnabled: b, required: p, fieldType: f } = P(), [N,
|
|
1336
|
+
const { id: t, form: o, value: n, onChange: l, onFieldBlur: a, onFieldFocus: i, errors: s, FieldLayout: d, fieldSettings: m, label: u, validation: y, target: I, autocompleteEnabled: b, required: p, fieldType: f } = P(), [N, D] = be(null), h = $t(), O = w(() => ({
|
|
1336
1337
|
...h,
|
|
1337
1338
|
...ir
|
|
1338
1339
|
}), [
|
|
@@ -1369,7 +1370,7 @@ const Zn = () => ue("country"), er = () => ue("subdivision"), tr = () => ue("cit
|
|
|
1369
1370
|
n,
|
|
1370
1371
|
B,
|
|
1371
1372
|
M
|
|
1372
|
-
]),
|
|
1373
|
+
]), S = R((U, G) => {
|
|
1373
1374
|
if (B && U === ye.COUNTRY && (n == null ? void 0 : n[U]) !== G) {
|
|
1374
1375
|
l == null || l({
|
|
1375
1376
|
[ye.COUNTRY]: G
|
|
@@ -1434,7 +1435,7 @@ const Zn = () => ue("country"), er = () => ue("subdivision"), tr = () => ue("cit
|
|
|
1434
1435
|
}, /* @__PURE__ */ r.createElement(Cn, {
|
|
1435
1436
|
fields: _t
|
|
1436
1437
|
}, /* @__PURE__ */ r.createElement("div", {
|
|
1437
|
-
ref:
|
|
1438
|
+
ref: D,
|
|
1438
1439
|
style: {
|
|
1439
1440
|
display: "contents"
|
|
1440
1441
|
}
|
|
@@ -1448,7 +1449,7 @@ const Zn = () => ue("country"), er = () => ue("subdivision"), tr = () => ue("cit
|
|
|
1448
1449
|
formSchema: g,
|
|
1449
1450
|
form: j,
|
|
1450
1451
|
values: n ?? cr,
|
|
1451
|
-
onFieldChange:
|
|
1452
|
+
onFieldChange: S,
|
|
1452
1453
|
onBlur: a,
|
|
1453
1454
|
onFocus: i,
|
|
1454
1455
|
errors: s ?? dr,
|
|
@@ -1470,8 +1471,8 @@ const ur = "_postalCodeControl_1tire_1", mr = "_comboControl_1tire_5", pr = "_co
|
|
|
1470
1471
|
postalCodeControl: ur,
|
|
1471
1472
|
comboControl: mr,
|
|
1472
1473
|
comboTrigger: pr
|
|
1473
|
-
},
|
|
1474
|
-
const e = nn(), t =
|
|
1474
|
+
}, Mr = () => {
|
|
1475
|
+
const e = nn(), t = tn(Me);
|
|
1475
1476
|
return /* @__PURE__ */ r.createElement(c, null, /* @__PURE__ */ r.createElement(c.Country, null, /* @__PURE__ */ r.createElement(c.Country.Label, {
|
|
1476
1477
|
className: L(Q, C.label)
|
|
1477
1478
|
}, /* @__PURE__ */ r.createElement(c.Country.Label.Required, {
|
|
@@ -1626,5 +1627,5 @@ const ur = "_postalCodeControl_1tire_1", mr = "_comboControl_1tire_5", pr = "_co
|
|
|
1626
1627
|
}))));
|
|
1627
1628
|
};
|
|
1628
1629
|
export {
|
|
1629
|
-
|
|
1630
|
+
Mr as M
|
|
1630
1631
|
};
|