@wix/form-elements 1.133.0 → 1.134.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-D0mwr3TL.js → appointment-rac-CZHb5jGz.js} +246 -246
- package/dist/component/{bookings-address-rac-BEnmwXax.js → bookings-address-rac-F39MfGmX.js} +1 -1
- package/dist/component/{bookings-email-rac-D56j9PXc.js → bookings-email-rac-D4CurQjr.js} +1 -1
- package/dist/component/{bookings-first-name-rac-xu3S-ih_.js → bookings-first-name-rac-Bz9o1eLl.js} +1 -1
- package/dist/component/{bookings-header-rac-hfBabv7v.js → bookings-header-rac-6mfX0WGf.js} +1 -1
- package/dist/component/{bookings-last-name-rac-6bMvN0Cm.js → bookings-last-name-rac-CD1-B7Ao.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DE70Omwf.js → bookings-login-bar-rac-2eQkfhBb.js} +17 -17
- package/dist/component/{bookings-phone-rac-D_EHRAiU.js → bookings-phone-rac-X6sSnHiH.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-BxgI9Zt6.js → bookings-rich-text-rac-f2artJnn.js} +1 -1
- package/dist/component/{calendar.module-DnhTT4QT.js → calendar.module-CKCBG_Pg.js} +11 -11
- package/dist/component/{checkbox-field-rac-BLDUOAXM.js → checkbox-field-rac-DoZ9bcw3.js} +26 -25
- package/dist/component/{checkbox-group-field-headless-CugSJIBp.js → checkbox-group-field-headless-B-d37T4z.js} +32 -31
- package/dist/component/{checkbox-group-field-rac-D4m9SmRX.js → checkbox-group-field-rac-0qYHz3g1.js} +6 -6
- package/dist/component/{checkbox-group-rac-BYqEsCwa.js → checkbox-group-rac-BqUJdAju.js} +1 -1
- package/dist/component/{checkbox-indicator-module-classes-zXKP5rD4.js → checkbox-indicator-module-classes-6173wvuW.js} +1 -1
- package/dist/component/{checkbox-rac-DkIBUAN7.js → checkbox-rac-BN-qNzpH.js} +1 -1
- package/dist/component/{contacts-address-rac-D1tzbiTM.js → contacts-address-rac-B7vWOTFf.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DO-1xG0u.js → contacts-birthdate-rac-Dl0OatzW.js} +1 -1
- package/dist/component/{contacts-company-rac-CzJK3YIo.js → contacts-company-rac-DIeGU0Bf.js} +1 -1
- package/dist/component/{contacts-email-rac-DLvMErBI.js → contacts-email-rac-BCH6ogWv.js} +1 -1
- package/dist/component/{contacts-first-name-rac-3RcSXL0h.js → contacts-first-name-rac-Cx-USWmx.js} +1 -1
- package/dist/component/{contacts-last-name-rac-BYoSi_QX.js → contacts-last-name-rac-CUZdJI9J.js} +1 -1
- package/dist/component/{contacts-phone-rac-DMYn0orB.js → contacts-phone-rac-hNCW_2UC.js} +1 -1
- package/dist/component/{contacts-position-rac-K1R6ihXo.js → contacts-position-rac-CJfOgxZc.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-DsWNSH6t.js → contacts-subscribe-rac-69721_c9.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-D7NjPiRf.js → contacts-tax-id-rac-CXXBqWIm.js} +1 -1
- package/dist/component/{date-availability-D3n6-g3h.js → date-availability-NQGPIrdZ.js} +1 -1
- package/dist/component/{date-input-field-rac-SyAmInlu.js → date-input-field-rac-C-we-suG.js} +60 -60
- package/dist/component/{date-input-rac-BQNOsWz1.js → date-input-rac-Cif7Bqxc.js} +1 -1
- package/dist/component/{date-picker-field-rac-DO1epod7.js → date-picker-field-rac-CHDkTXVH.js} +63 -63
- package/dist/component/{date-picker-rac-DQElftUu.js → date-picker-rac-DdhgbY6W.js} +1 -1
- package/dist/component/{date-time-input-field-rac-CV5wZSXO.js → date-time-input-field-rac-BjtDbiqE.js} +7 -7
- package/dist/component/{date-time-input-rac-DvHwpjnk.js → date-time-input-rac-BDP5SN-i.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BfcKoslb.js → dext-checkbox-group-rac-CkF41kIR.js} +2 -2
- package/dist/component/{dext-checkbox-rac-DhadtXb5.js → dext-checkbox-rac-DjYpsxmq.js} +1 -1
- package/dist/component/{dext-date-picker-rac-0Dmo3mrG.js → dext-date-picker-rac-BxXZLogr.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-Cnh7Aqiq.js → dext-date-time-input-rac-e4y_JjEx.js} +1 -1
- package/dist/component/{dext-dropdown-rac-CajXcYsB.js → dext-dropdown-rac-DsjB3ZX7.js} +1 -1
- package/dist/component/{dext-email-rac-DynJaiZt.js → dext-email-rac-ClPp1g4D.js} +1 -1
- package/dist/component/{dext-number-input-rac-LmTKwb80.js → dext-number-input-rac-D2nZNzyN.js} +1 -1
- package/dist/component/{dext-phone-rac-Cw2roq1_.js → dext-phone-rac-PNiQZ-Lr.js} +1 -1
- package/dist/component/{dext-radio-group-rac-CaNZJrkc.js → dext-radio-group-rac-DUltmMHM.js} +2 -2
- package/dist/component/{dext-rating-input-rac-CAL1jb0q.js → dext-rating-input-rac-C_apsfGT.js} +1 -1
- package/dist/component/{dext-tags-rac-BOp_amVK.js → dext-tags-rac-DkB_CmOD.js} +2 -2
- package/dist/component/{dext-text-area-rac-6DYTHIeh.js → dext-text-area-rac-CfoIK0S7.js} +1 -1
- package/dist/component/{dext-text-input-rac-CDWthvV3.js → dext-text-input-rac-CIOXlk6U.js} +1 -1
- package/dist/component/{dext-url-input-rac-CsS4NPYO.js → dext-url-input-rac-UHJAs3ck.js} +1 -1
- package/dist/component/{donation-rac-B7lFkotu.js → donation-rac-BJfvVi_d.js} +7 -10
- package/dist/component/{dropdown-field-headless-ajQghLaj.js → dropdown-field-headless-0DB-T-3t.js} +5 -5
- package/dist/component/{dropdown-field-rac-Bf5LQqSL.js → dropdown-field-rac-DB-pd2a8.js} +5 -5
- package/dist/component/{dropdown-rac-CJmA_ePl.js → dropdown-rac-4T4zRBVy.js} +1 -1
- package/dist/component/{ecom-address-rac-B49ZP2qc.js → ecom-address-rac-BjWD1sRX.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-C8qImtxo.js → ecom-subscription-checkbox-rac-CYCufut6.js} +2 -2
- package/dist/component/{email-input-field-rac-B_bEWp5N.js → email-input-field-rac-DlLoY9jB.js} +4 -4
- package/dist/component/{events-repeater-rac-DXxqmIBX.js → events-repeater-rac-CPHJbWcZ.js} +48 -47
- package/dist/component/{events-rsvp-rac-BaJQLSv3.js → events-rsvp-rac-NXf8Fv3A.js} +4 -4
- package/dist/component/{field-error-headless-BxEFPwKI.js → field-error-headless-C-wyL0uw.js} +1 -1
- package/dist/component/{field-label-headless-5mewgrhq.js → field-label-headless-32mvEUId.js} +1 -1
- package/dist/component/field-rac.module-DfEb7pBp.js +25 -0
- package/dist/component/file-upload-rac-BicD_Bhj.js +566 -0
- package/dist/component/{fixed-payment-rac-S68bqvbB.js → fixed-payment-rac-DxHalHUv.js} +4 -4
- package/dist/component/{form-CPY-PtxT.js → form-B2wZnWX9.js} +69 -69
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-r6dYbnvA.js → header-field-rac-C47Te_oW.js} +2 -2
- package/dist/component/{header-rac-C9gaKsaE.js → header-rac-ChDYKTx5.js} +1 -1
- package/dist/component/{image-choice-rac-BbES5dAK.js → image-choice-rac-CqTBWpcY.js} +42 -45
- package/dist/component/{index-o-TpCHqo.js → index-BF_Aifc-.js} +4 -4
- package/dist/component/{index-C6zuIVeJ.js → index-Br8x_xx8.js} +2 -2
- package/dist/component/{isObjectLike-BSRiBVs9.js → isObjectLike-D4VXbd0T.js} +1 -1
- package/dist/component/{multiline-address-field-rac-BfVIiFyM.js → multiline-address-field-rac-DYcfzGJb.js} +8 -8
- package/dist/component/{multiline-address-rac-BOKBExhi.js → multiline-address-rac-DcGDGyL-.js} +1 -1
- package/dist/component/{number-input-field-rac-BRKFm8aA.js → number-input-field-rac-C_Fh8oeD.js} +5 -5
- package/dist/component/{number-input-rac-BNbCCb-g.js → number-input-rac-J2tCaAYx.js} +1 -1
- package/dist/component/{password-rac-BygVJf7f.js → password-rac-wlfBhft8.js} +5 -5
- package/dist/component/{payment-input-rac-CoMbHcHG.js → payment-input-rac-DKxy3uE0.js} +5 -5
- package/dist/component/{phone-input-field-rac-dFjxptEr.js → phone-input-field-rac-ClXUOLpB.js} +28 -29
- package/dist/component/{phone-rac-Dup3AP9J.js → phone-rac-D0-Poz1e.js} +1 -1
- package/dist/component/{product-list-rac-B62mNB_W.js → product-list-rac-TF5fgLyc.js} +69 -68
- package/dist/component/{quiz-radio-group-rac-DPMhDtr7.js → quiz-radio-group-rac-BX4V_6wg.js} +1 -1
- package/dist/component/{radio-button-module-classes-BMvPai_6.js → radio-button-module-classes-D8UpzVUK.js} +18 -17
- package/dist/component/{radio-group-field-rac-DPt2Zl4G.js → radio-group-field-rac-C0zCVtjj.js} +5 -5
- package/dist/component/{radio-group-rac-BZyGqFzr.js → radio-group-rac-DrKqgPRT.js} +1 -1
- package/dist/component/{rating-input-field-rac-C3E0KzV-.js → rating-input-field-rac-DjxfTgv5.js} +35 -33
- package/dist/component/{rating-input-rac-BKLz4l_D.js → rating-input-rac-DO4Bpdj3.js} +1 -1
- package/dist/component/{rich-content-rac.module-CQ1qa_zz.js → rich-content-rac.module-DUNKiTkT.js} +1 -1
- package/dist/component/{rich-text-field-rac-BfdA5KNz.js → rich-text-field-rac-DIOTzVwj.js} +2 -2
- package/dist/component/{rich-text-rac-BFbhfFuF.js → rich-text-rac-C_E_vEGz.js} +1 -1
- package/dist/component/{service-dropdown-rac-VulpHBki.js → service-dropdown-rac-B3gQT9Tj.js} +6 -6
- package/dist/component/{services-multi-choice-rac-CIx5UpfD.js → services-multi-choice-rac-D40hZhBB.js} +7 -7
- package/dist/component/{signature-rac-BdxMBfl9.js → signature-rac-CKXpb2WN.js} +269 -264
- package/dist/component/{submit-button-rac-CkuWGEyL.js → submit-button-rac-CDS-vtXq.js} +2 -2
- package/dist/component/{tags-field-rac-DKo_Yb5i.js → tags-field-rac-CdQWq8k5.js} +54 -57
- package/dist/component/{tags-rac-BimVd3ym.js → tags-rac-BwChqdGx.js} +1 -1
- package/dist/component/{text-area-field-rac-DEiLtCnb.js → text-area-field-rac-VCFJuHx4.js} +5 -5
- package/dist/component/{text-area-rac-CHZtsq0f.js → text-area-rac-BICVNsdn.js} +1 -1
- package/dist/component/{text-input-field-rac-CSHvUtRG.js → text-input-field-rac-C9gyRhcK.js} +4 -4
- package/dist/component/{text-input-headless-BYcExFPS.js → text-input-headless-BdkaD-re.js} +3 -3
- package/dist/component/{text-input-rac-D-R9btYo.js → text-input-rac-B7buOGbq.js} +1 -1
- package/dist/component/{time-input-rac-wkHemVzj.js → time-input-rac-CSFhEYi0.js} +5 -5
- package/dist/component/{url-input-field-rac-KJEcLyFk.js → url-input-field-rac-BIXokgHy.js} +5 -5
- package/dist/component/{url-input-rac-JFfEH389.js → url-input-rac-tTN0GaTH.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-BetaTWbW.js → use-dropdown-option-class-name-C6zB6TNA.js} +3 -3
- package/dist/component/{use-dropdown-trigger-class-name-C0ffAjFn.js → use-dropdown-trigger-class-name-CEq68SuK.js} +2 -2
- package/dist/component/use-element-state-class-name-BFZzVwqe.js +23 -0
- package/dist/component/use-hoverable-input-class-name-CzZmczhf.js +25 -0
- package/dist/component/{use-service-options-base-q0JTA7UI.js → use-service-options-base-DOCVW9ax.js} +1 -1
- package/dist/component/use-text-input-class-name-BNX3qkmh.js +6 -0
- package/package.json +2 -2
- package/dist/component/field-rac.module-BGN-O8tV.js +0 -25
- package/dist/component/file-upload-rac-D9Z1Cumr.js +0 -562
- package/dist/component/use-element-state-class-name-BOks3she.js +0 -20
- package/dist/component/use-hoverable-input-class-name-jxtCw16L.js +0 -23
- package/dist/component/use-text-input-class-name-CTa0bC4T.js +0 -6
package/dist/component/form.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import m from "classnames";
|
|
2
2
|
import e from "react";
|
|
3
|
-
import { bh as u, aV as i, aU as C, aX as R, au as T, ac as d } from "./form-
|
|
4
|
-
import { u as g, R as p, s as h, T as S } from "./rich-content-rac.module-
|
|
3
|
+
import { bh as u, aV as i, aU as C, aX as R, au as T, ac as d } from "./form-B2wZnWX9.js";
|
|
4
|
+
import { u as g, R as p, s as h, T as S } from "./rich-content-rac.module-DUNKiTkT.js";
|
|
5
5
|
const y = ({ truncate: t = !0 } = {}) => {
|
|
6
6
|
const { content: a, maxShownParagraphs: s } = u(), n = e.useMemo(() => ({
|
|
7
7
|
colorPalette: R(),
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import e, { useMemo as H, useCallback as T, useRef as G } from "react";
|
|
2
2
|
import { RicosViewer as k } from "@wix/ricos/viewer";
|
|
3
3
|
import u from "classnames";
|
|
4
|
-
import { bh as b, be as x, bj as P, ba as B, I as q, U, w, y as V, v as j, p as z, x as K, f } from "./form-
|
|
4
|
+
import { bh as b, be as x, bj as P, ba as B, I as q, U, w, y as V, v as j, p as z, x as K, f } from "./form-B2wZnWX9.js";
|
|
5
5
|
import { CheckboxGroup as Q, CheckboxField as Y, CheckboxButton as $ } from "react-aria-components";
|
|
6
6
|
import { f as m, a as F } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { L as J, g as W } from "./field-label-headless-
|
|
8
|
-
import { D as X, E as Z } from "./field-error-headless-
|
|
7
|
+
import { L as J, g as W } from "./field-label-headless-32mvEUId.js";
|
|
8
|
+
import { D as X, E as Z } from "./field-error-headless-C-wyL0uw.js";
|
|
9
9
|
import { F as ee } from "./fieldset-headless-CD3fds9J.js";
|
|
10
10
|
import { E as te } from "./error-icon-hZxQ6DEy.js";
|
|
11
|
-
import { s as O } from "./field-rac.module-
|
|
12
|
-
import { u as oe } from "./use-element-state-class-name-
|
|
13
|
-
const o = ({ children: t, className:
|
|
14
|
-
const { id:
|
|
11
|
+
import { s as O } from "./field-rac.module-DfEb7pBp.js";
|
|
12
|
+
import { u as oe } from "./use-element-state-class-name-BFZzVwqe.js";
|
|
13
|
+
const o = ({ children: t, className: n }) => {
|
|
14
|
+
const { id: s, value: a, onChange: i, disabled: l, readOnly: r, required: c, onBlur: I, onFocus: p, hasError: C, FieldLayout: L } = b(), { inputId: g, labelId: _, ariaDescribedBy: R } = x(), S = m(t, o.Label), A = m(t, o.Options), D = m(t, o.Description), h = m(t, o.Error), M = H(() => a || [], [
|
|
15
15
|
a
|
|
16
16
|
]), v = T((y) => {
|
|
17
17
|
i == null || i(y);
|
|
@@ -19,7 +19,7 @@ const o = ({ children: t, className: s }) => {
|
|
|
19
19
|
i
|
|
20
20
|
]);
|
|
21
21
|
return /* @__PURE__ */ e.createElement(L, {
|
|
22
|
-
fieldId:
|
|
22
|
+
fieldId: s,
|
|
23
23
|
renderLabel: () => S,
|
|
24
24
|
renderInput: () => /* @__PURE__ */ e.createElement(ee, {
|
|
25
25
|
id: g,
|
|
@@ -29,7 +29,7 @@ const o = ({ children: t, className: s }) => {
|
|
|
29
29
|
onBlur: I,
|
|
30
30
|
onFocus: p
|
|
31
31
|
}, /* @__PURE__ */ e.createElement(Q, {
|
|
32
|
-
className:
|
|
32
|
+
className: n,
|
|
33
33
|
"aria-labelledby": _,
|
|
34
34
|
value: M,
|
|
35
35
|
onChange: v,
|
|
@@ -40,30 +40,30 @@ const o = ({ children: t, className: s }) => {
|
|
|
40
40
|
}, A)),
|
|
41
41
|
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, h, D)
|
|
42
42
|
});
|
|
43
|
-
}, N = ({ children: t, className:
|
|
44
|
-
const { id:
|
|
43
|
+
}, N = ({ children: t, className: n }) => {
|
|
44
|
+
const { id: s, options: a, numberOfColumns: i } = b(), l = m(t, N.Option);
|
|
45
45
|
return /* @__PURE__ */ e.createElement("div", {
|
|
46
|
-
className:
|
|
46
|
+
className: n,
|
|
47
47
|
"data-columns": i
|
|
48
48
|
}, a == null ? void 0 : a.map((r, c) => F(l, {
|
|
49
49
|
key: r.id || r.label,
|
|
50
50
|
option: r,
|
|
51
51
|
isFirst: c === 0,
|
|
52
|
-
fieldId:
|
|
52
|
+
fieldId: s
|
|
53
53
|
})));
|
|
54
54
|
}, ae = ({ className: t }) => /* @__PURE__ */ e.createElement("div", {
|
|
55
55
|
"aria-hidden": "true",
|
|
56
56
|
className: t
|
|
57
|
-
}), ne = ({ className: t, ...
|
|
57
|
+
}), ne = ({ className: t, ...n }) => {
|
|
58
58
|
var I, p;
|
|
59
|
-
const { option:
|
|
59
|
+
const { option: s } = n, { choiceImageResize: a, choiceImageAlignment: i } = b(), l = (I = s.media) == null ? void 0 : I.image, r = l && W(l, l.width, l.height);
|
|
60
60
|
if (!l || !r)
|
|
61
61
|
return /* @__PURE__ */ e.createElement("div", {
|
|
62
62
|
className: t,
|
|
63
63
|
"data-placeholder": !0,
|
|
64
64
|
"data-hook": "image-choice-option-image"
|
|
65
65
|
});
|
|
66
|
-
const c = ((p =
|
|
66
|
+
const c = ((p = s.media) == null ? void 0 : p.altText) || s.altText || l.altText || "";
|
|
67
67
|
return /* @__PURE__ */ e.createElement("img", {
|
|
68
68
|
className: t,
|
|
69
69
|
src: r,
|
|
@@ -72,20 +72,20 @@ const o = ({ children: t, className: s }) => {
|
|
|
72
72
|
"data-alignment": i,
|
|
73
73
|
"data-hook": "image-choice-option-image"
|
|
74
74
|
});
|
|
75
|
-
}, se = ({ className: t, ...
|
|
76
|
-
const { option:
|
|
77
|
-
return !
|
|
75
|
+
}, se = ({ className: t, ...n }) => {
|
|
76
|
+
const { option: s } = n;
|
|
77
|
+
return !s.label || s.isLabelHidden ? null : /* @__PURE__ */ e.createElement("span", {
|
|
78
78
|
className: t
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
const { option: a, isFirst: i = !1, fieldId: l } =
|
|
79
|
+
}, s.label);
|
|
80
|
+
}, E = ({ children: t, className: n, ...s }) => {
|
|
81
|
+
const { option: a, isFirst: i = !1, fieldId: l } = s, { disabled: r, readOnly: c, hasError: I } = b(), p = G(null);
|
|
82
82
|
P(() => {
|
|
83
83
|
var _;
|
|
84
84
|
i && ((_ = p.current) == null || _.focus({
|
|
85
85
|
preventScroll: !0
|
|
86
86
|
}));
|
|
87
87
|
}, l);
|
|
88
|
-
const C = m(t,
|
|
88
|
+
const C = m(t, E.Input), L = m(t, E.Image), g = m(t, E.Label);
|
|
89
89
|
return /* @__PURE__ */ e.createElement(Y, {
|
|
90
90
|
value: a.label,
|
|
91
91
|
isDisabled: r,
|
|
@@ -94,7 +94,7 @@ const o = ({ children: t, className: s }) => {
|
|
|
94
94
|
}, /* @__PURE__ */ e.createElement($, {
|
|
95
95
|
ref: p,
|
|
96
96
|
"aria-label": a.isLabelHidden ? a.label : void 0,
|
|
97
|
-
className:
|
|
97
|
+
className: n,
|
|
98
98
|
"data-hook": `image-choice-${a.label}`
|
|
99
99
|
}, C, F(L, {
|
|
100
100
|
option: a
|
|
@@ -102,56 +102,53 @@ const o = ({ children: t, className: s }) => {
|
|
|
102
102
|
option: a
|
|
103
103
|
})));
|
|
104
104
|
};
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
E.Input = ae;
|
|
106
|
+
E.Image = ne;
|
|
107
|
+
E.Label = se;
|
|
108
108
|
o.Label = J;
|
|
109
109
|
o.Options = N;
|
|
110
|
-
N.Option =
|
|
110
|
+
N.Option = E;
|
|
111
111
|
o.Description = X;
|
|
112
112
|
o.Error = Z;
|
|
113
|
-
const le = "
|
|
113
|
+
const le = "_options_9rde9_1", ie = "_optionInput_9rde9_33", re = "_option_9rde9_1", ce = "_optionHover_9rde9_66", me = "_optionSelected_9rde9_66", pe = "_optionLabel_9rde9_106", de = "_optionImage_9rde9_138", d = {
|
|
114
114
|
options: le,
|
|
115
115
|
optionInput: ie,
|
|
116
116
|
option: re,
|
|
117
117
|
optionHover: ce,
|
|
118
118
|
optionSelected: me,
|
|
119
119
|
optionLabel: pe,
|
|
120
|
-
optionImage:
|
|
121
|
-
},
|
|
120
|
+
optionImage: de
|
|
121
|
+
}, Ee = ({ content: t, locale: n }) => /* @__PURE__ */ e.createElement(k, {
|
|
122
122
|
content: t,
|
|
123
|
-
locale:
|
|
123
|
+
locale: n
|
|
124
124
|
}), Ie = {
|
|
125
|
-
base:
|
|
126
|
-
selected:
|
|
127
|
-
hover:
|
|
125
|
+
base: d.option,
|
|
126
|
+
selected: d.optionSelected,
|
|
127
|
+
hover: d.optionHover
|
|
128
128
|
}, ue = () => {
|
|
129
129
|
const t = oe({
|
|
130
130
|
globalClasses: K,
|
|
131
131
|
moduleClasses: Ie
|
|
132
|
-
}),
|
|
132
|
+
}), n = 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
134
|
className: u(q, O.label)
|
|
135
135
|
}, /* @__PURE__ */ e.createElement(o.Label.Required, {
|
|
136
136
|
className: u(U, O.requiredMark)
|
|
137
137
|
})), /* @__PURE__ */ e.createElement(o.Options, {
|
|
138
|
-
className: u(w,
|
|
138
|
+
className: u(w, d.options)
|
|
139
139
|
}, /* @__PURE__ */ e.createElement(o.Options.Option, {
|
|
140
|
-
className:
|
|
141
|
-
isSelected: n,
|
|
142
|
-
isHovered: a
|
|
143
|
-
})
|
|
140
|
+
className: t
|
|
144
141
|
}, /* @__PURE__ */ e.createElement(o.Options.Option.Input, {
|
|
145
|
-
className:
|
|
142
|
+
className: d.optionInput
|
|
146
143
|
}), /* @__PURE__ */ e.createElement(o.Options.Option.Image, {
|
|
147
|
-
className: u(V,
|
|
144
|
+
className: u(V, d.optionImage, n)
|
|
148
145
|
}), /* @__PURE__ */ e.createElement(o.Options.Option.Label, {
|
|
149
|
-
className:
|
|
146
|
+
className: d.optionLabel
|
|
150
147
|
}))), /* @__PURE__ */ e.createElement(o.Error, {
|
|
151
148
|
className: u(j, O.error)
|
|
152
149
|
}, /* @__PURE__ */ e.createElement(te, null), /* @__PURE__ */ e.createElement(o.Error.Text, null)), /* @__PURE__ */ e.createElement(o.Description, {
|
|
153
150
|
className: u(z, O.description)
|
|
154
|
-
},
|
|
151
|
+
}, Ee));
|
|
155
152
|
}, De = () => /* @__PURE__ */ e.createElement(ue, null);
|
|
156
153
|
export {
|
|
157
154
|
De as ImageChoiceRAC
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { e as R, aC as _, aR as de, aD as O, ai as Ge, B as Be, aw as qe, ap as He, ao as I, ax as Ee, aG as re, aA as Fe, c as B, aq as M, b1 as Te, as as je, ar as he, at as q } from "./form-
|
|
2
|
-
import { aY as Mn } from "./form-
|
|
1
|
+
import { e as R, aC as _, aR as de, aD as O, ai as Ge, B as Be, aw as qe, ap as He, ao as I, ax as Ee, aG as re, aA as Fe, c as B, aq as M, b1 as Te, as as je, ar as he, at as q } from "./form-B2wZnWX9.js";
|
|
2
|
+
import { aY as Mn } from "./form-B2wZnWX9.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-NQGPIrdZ.js";
|
|
10
|
+
import { a as Sn } from "./date-availability-NQGPIrdZ.js";
|
|
11
11
|
import { C as tt } from "./calling-country-codes-PyWuOTmF.js";
|
|
12
12
|
function rt(e) {
|
|
13
13
|
var t, r;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b0 as n } from "./form-
|
|
2
|
-
import { A as N, a as S, C as p, av as g, aM as q, aN as D, b2 as L } from "./form-
|
|
1
|
+
import { b0 as n } from "./form-B2wZnWX9.js";
|
|
2
|
+
import { A as N, a as S, C as p, av as g, aM as q, aN as D, b2 as L } from "./form-B2wZnWX9.js";
|
|
3
3
|
const l = (e = !1) => ({
|
|
4
4
|
country: {
|
|
5
5
|
required: e
|
|
@@ -2,21 +2,21 @@ import { RicosViewer as G } from "@wix/ricos/viewer";
|
|
|
2
2
|
import L from "classnames";
|
|
3
3
|
import r, { useMemo as q, createContext as Ve, useContext as Ce, useState as be, useRef as x, useCallback as R, useEffect as _e } from "react";
|
|
4
4
|
import { UNSAFE_PortalProvider as _t } from "react-aria";
|
|
5
|
-
import { bc as ft, d as yt, b7 as Pt, b9 as Ct, aM as Tt, aN as wt, aF as Mt, aL as W, F as K, br as Pe, b0 as lt, bh as P, be as T, bj as ae, bd as It, aR as qt, C as Oe, a_ as xt, b2 as Bt, bo as kt, bi as $t, bn as Ut, b5 as Vt, aW as Wt, b4 as Kt, bk as Yt, al as Ht, I as z, U as Q, K as ge, v as Z, p as ee } from "./form-
|
|
5
|
+
import { bc as ft, d as yt, b7 as Pt, b9 as Ct, aM as Tt, aN as wt, aF as Mt, aL as W, F as K, br as Pe, b0 as lt, bh as P, be as T, bj as ae, bd as It, aR as qt, C as Oe, a_ as xt, b2 as Bt, bo as kt, bi as $t, bn as Ut, b5 as Vt, aW as Wt, b4 as Kt, bk as Yt, al as Ht, I as z, U as Q, K as ge, v as Z, p as ee } from "./form-B2wZnWX9.js";
|
|
6
6
|
import { f as E, a as F } from "./find-child-C60k4CxG.js";
|
|
7
7
|
import { F as jt, V as Jt } from "./headless-styles-CmcyA_pi.js";
|
|
8
|
-
import { a as Xt, u as Gt } from "./use-dropdown-trigger-class-name-
|
|
8
|
+
import { a as Xt, u as Gt } from "./use-dropdown-trigger-class-name-CEq68SuK.js";
|
|
9
9
|
import { TextField as fe, Input as le, ComboBoxStateContext as We, ComboBox as he, Popover as De, ListBox as Te, ListBoxItem as Se, Group as Lt, Button as Nt } from "react-aria-components";
|
|
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 zt, c as Qt, a as Zt, r as gt } from "./isObjectLike-
|
|
13
|
-
import { V as en, u as tn } from "./use-dropdown-option-class-name-
|
|
10
|
+
import { D as ie, E as ce } from "./field-error-headless-C-wyL0uw.js";
|
|
11
|
+
import { L as de } from "./field-label-headless-32mvEUId.js";
|
|
12
|
+
import { e as zt, c as Qt, a as Zt, r as gt } from "./isObjectLike-D4VXbd0T.js";
|
|
13
|
+
import { V as en, u as tn } from "./use-dropdown-option-class-name-C6zB6TNA.js";
|
|
14
14
|
import { u as nn } from "./use-invoke-callback-UH73A_J3.js";
|
|
15
15
|
import { C as it } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
16
|
import { E as te } from "./error-icon-hZxQ6DEy.js";
|
|
17
17
|
import { H as we } from "./custom-focus-class-_483Pkwp.js";
|
|
18
|
-
import { s as I } from "./field-rac.module-
|
|
19
|
-
import { u as rn } from "./use-text-input-class-name-
|
|
18
|
+
import { s as I } from "./field-rac.module-DfEb7pBp.js";
|
|
19
|
+
import { u as rn } from "./use-text-input-class-name-BNX3qkmh.js";
|
|
20
20
|
const on = (e, t, o) => {
|
|
21
21
|
var a, l, i, s;
|
|
22
22
|
const n = (a = e.steps) == null ? void 0 : a.map((d) => {
|
package/dist/component/{number-input-field-rac-BRKFm8aA.js → number-input-field-rac-C_Fh8oeD.js}
RENAMED
|
@@ -2,15 +2,15 @@ import { RicosViewer as P } from "@wix/ricos/viewer";
|
|
|
2
2
|
import i from "classnames";
|
|
3
3
|
import r, { useState as U, useCallback as j, useEffect as Q, useRef as $ } from "react";
|
|
4
4
|
import { NumberField as z, Input as G } from "react-aria-components";
|
|
5
|
-
import { bh as _, be as S, br as H, bj as J, I as K, U as W, v as X, p as Y } from "./form-
|
|
5
|
+
import { bh as _, be as S, br as H, bj as J, I as K, U as W, v as X, p as Y } from "./form-B2wZnWX9.js";
|
|
6
6
|
import { f as c } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as Z, E as w } from "./field-error-headless-
|
|
8
|
-
import { L as ee } from "./field-label-headless-
|
|
7
|
+
import { D as Z, E as w } from "./field-error-headless-C-wyL0uw.js";
|
|
8
|
+
import { L as ee } from "./field-label-headless-32mvEUId.js";
|
|
9
9
|
import { g as re, c as te } from "./numeric-input-utils-CuBMi4-a.js";
|
|
10
10
|
import { u as ne } from "./use-invoke-callback-UH73A_J3.js";
|
|
11
11
|
import { E as ae } from "./error-icon-hZxQ6DEy.js";
|
|
12
|
-
import { s as p } from "./field-rac.module-
|
|
13
|
-
import { u as se } from "./use-text-input-class-name-
|
|
12
|
+
import { s as p } from "./field-rac.module-DfEb7pBp.js";
|
|
13
|
+
import { u as se } from "./use-text-input-class-name-BNX3qkmh.js";
|
|
14
14
|
const e = ({ children: t }) => {
|
|
15
15
|
var F, L, R;
|
|
16
16
|
const { id: a, value: s, onChange: l, disabled: d, required: b, readOnly: o, onBlur: E, onFocus: f, FieldLayout: m, hasError: u, validation: n } = _(), { labelId: y } = S(), D = ((F = n == null ? void 0 : n.number) == null ? void 0 : F.multipleOf) || 1, A = (L = n == null ? void 0 : n.number) == null ? void 0 : L.maximum, g = (R = n == null ? void 0 : n.number) == null ? void 0 : R.minimum, h = O(s), [x, I] = U(h), T = ne(E), V = c(t, e.Label), q = c(t, e.Input), M = c(t, e.Description), k = c(t, e.Error), B = j((N) => {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import e, { useState as N, useRef as S } from "react";
|
|
2
2
|
import { RicosViewer as x } from "@wix/ricos/viewer";
|
|
3
3
|
import d from "classnames";
|
|
4
|
-
import { bh as E, be as I, bj as O, br as A, I as B, U as v, v as V, p as P } from "./form-
|
|
4
|
+
import { bh as E, be as I, bj as O, br as A, I as B, U as v, v as V, p as P } from "./form-B2wZnWX9.js";
|
|
5
5
|
import { TextField as M, Group as k, Input as q, Button as U } from "react-aria-components";
|
|
6
6
|
import { f as u, a as b } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as j, E as H } from "./field-error-headless-
|
|
8
|
-
import { L as W } from "./field-label-headless-
|
|
7
|
+
import { D as j, E as H } from "./field-error-headless-C-wyL0uw.js";
|
|
8
|
+
import { L as W } from "./field-label-headless-32mvEUId.js";
|
|
9
9
|
import { E as Z } from "./error-icon-hZxQ6DEy.js";
|
|
10
10
|
import { H as G } from "./custom-focus-class-_483Pkwp.js";
|
|
11
|
-
import { s as p } from "./field-rac.module-
|
|
12
|
-
import { u as Q } from "./use-text-input-class-name-
|
|
11
|
+
import { s as p } from "./field-rac.module-DfEb7pBp.js";
|
|
12
|
+
import { u as Q } from "./use-text-input-class-name-BNX3qkmh.js";
|
|
13
13
|
const t = ({ children: r, className: o }) => {
|
|
14
14
|
const { id: l, value: s, onChange: c, disabled: n, readOnly: m, required: a, hasError: i, onBlur: f, onFocus: C, FieldLayout: _ } = E(), { labelId: y } = I(), [R, D] = N(!1), F = u(r, t.Label), L = u(r, t.Control), T = u(r, t.Description), h = u(r, t.Error);
|
|
15
15
|
return /* @__PURE__ */ e.createElement(_, {
|
|
@@ -2,16 +2,16 @@ import r, { useCallback as P, useRef as Q } from "react";
|
|
|
2
2
|
import { RicosViewer as w } from "@wix/ricos/viewer";
|
|
3
3
|
import p from "classnames";
|
|
4
4
|
import { TextField as z, Group as J, Input as K } from "react-aria-components";
|
|
5
|
-
import { bh as R, be as D, b9 as T, br as W, bj as X, I as Y, U as Z, v as ee, p as re } from "./form-
|
|
5
|
+
import { bh as R, be as D, b9 as T, br as W, bj as X, I as Y, U as Z, v as ee, p as re } from "./form-B2wZnWX9.js";
|
|
6
6
|
import { f as i } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as te, E as ne } from "./field-error-headless-
|
|
8
|
-
import { L as ae } from "./field-label-headless-
|
|
7
|
+
import { D as te, E as ne } from "./field-error-headless-C-wyL0uw.js";
|
|
8
|
+
import { L as ae } from "./field-label-headless-32mvEUId.js";
|
|
9
9
|
import { f as N, g as se } from "./payment-field-utils-DobiK5Xh.js";
|
|
10
10
|
import { u as oe } from "./use-synced-display-value-DcAxdn3M.js";
|
|
11
11
|
import { E as le } from "./error-icon-hZxQ6DEy.js";
|
|
12
12
|
import { H as ce } from "./custom-focus-class-_483Pkwp.js";
|
|
13
|
-
import { s as d } from "./field-rac.module-
|
|
14
|
-
import { u as ie } from "./use-text-input-class-name-
|
|
13
|
+
import { s as d } from "./field-rac.module-DfEb7pBp.js";
|
|
14
|
+
import { u as ie } from "./use-text-input-class-name-BNX3qkmh.js";
|
|
15
15
|
function ue(e, t) {
|
|
16
16
|
return {
|
|
17
17
|
productId: e.id,
|
package/dist/component/{phone-input-field-rac-dFjxptEr.js → phone-input-field-rac-ClXUOLpB.js}
RENAMED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { RicosViewer as Ce } from "@wix/ricos/viewer";
|
|
2
2
|
import g from "classnames";
|
|
3
3
|
import t, { useMemo as j, useState as $, useRef as F, useEffect as k, useCallback as Z, createContext as ee, useContext as H, useId as de } from "react";
|
|
4
|
-
import { b0 as ye, br as w, b9 as te, bq as Ee, bh as D, be as ne, bj as fe, I as he, U as ge, H as be, K as Oe, v as _e, p as Ne } from "./form-
|
|
4
|
+
import { b0 as ye, br as w, b9 as te, bq as Ee, bh as D, be as ne, bj as fe, I as he, U as ge, H as be, K as Oe, v as _e, p as Ne } from "./form-B2wZnWX9.js";
|
|
5
5
|
import { UNSAFE_PortalProvider as Se } from "react-aria";
|
|
6
6
|
import { Dialog as oe, OverlayTriggerStateContext as Le, ModalOverlay as Ie, Modal as ve, SearchField as Pe, Group as q, ListBoxItem as Fe, DialogTrigger as we, Select as De, Input as re, Autocomplete as Be } from "react-aria-components";
|
|
7
|
-
import { f as h, a as
|
|
8
|
-
import { D as Re, E as xe } from "./field-error-headless-
|
|
9
|
-
import { L as Me } from "./field-label-headless-
|
|
7
|
+
import { f as h, a as I } from "./find-child-C60k4CxG.js";
|
|
8
|
+
import { D as Re, E as xe } from "./field-error-headless-C-wyL0uw.js";
|
|
9
|
+
import { L as Me } from "./field-label-headless-32mvEUId.js";
|
|
10
10
|
import { N as Te, S as je } from "./non-modal-popover-D-u13tmp.js";
|
|
11
11
|
import { u as $e } from "./use-invoke-callback-UH73A_J3.js";
|
|
12
|
-
import { a as Ae, u as ke } from "./use-dropdown-trigger-class-name-
|
|
13
|
-
import { V as Ue, u as Ve } from "./use-dropdown-option-class-name-
|
|
12
|
+
import { a as Ae, u as ke } from "./use-dropdown-trigger-class-name-CEq68SuK.js";
|
|
13
|
+
import { V as Ue, u as Ve } from "./use-dropdown-option-class-name-C6zB6TNA.js";
|
|
14
14
|
import ae, { AsYouType as qe, isValidPhoneNumber as He, isSupportedCountry as Ge } from "libphonenumber-js";
|
|
15
15
|
import "libphonenumber-js/metadata.min.json";
|
|
16
16
|
import { C as Q } from "./calling-country-codes-PyWuOTmF.js";
|
|
17
17
|
import { C as Ke } from "./chevron-down-icon-CcpVm6B-.js";
|
|
18
18
|
import { E as Ye } from "./error-icon-hZxQ6DEy.js";
|
|
19
19
|
import { H as W } from "./custom-focus-class-_483Pkwp.js";
|
|
20
|
-
import { s as O } from "./field-rac.module-
|
|
21
|
-
import { u as ze } from "./use-text-input-class-name-
|
|
20
|
+
import { s as O } from "./field-rac.module-DfEb7pBp.js";
|
|
21
|
+
import { u as ze } from "./use-text-input-class-name-BNX3qkmh.js";
|
|
22
22
|
function J(e) {
|
|
23
23
|
const n = e ? ae(e) : void 0, r = n == null ? void 0 : n.country;
|
|
24
24
|
if (r)
|
|
@@ -99,7 +99,7 @@ function Je({ value: e, defaultCountryCode: n, allowedCountryCodes: r, onChange:
|
|
|
99
99
|
}
|
|
100
100
|
const f = J(p);
|
|
101
101
|
u((y) => {
|
|
102
|
-
const
|
|
102
|
+
const L = f || y || ((r == null ? void 0 : r.length) === 1 ? r[0] : void 0), N = U(X(p, L));
|
|
103
103
|
return l.current = N ?? "", o(N), f || y;
|
|
104
104
|
});
|
|
105
105
|
}, [
|
|
@@ -145,28 +145,28 @@ const se = /* @__PURE__ */ ee(null), _ = () => {
|
|
|
145
145
|
className: n
|
|
146
146
|
});
|
|
147
147
|
}, s = ({ children: e }) => {
|
|
148
|
-
var
|
|
149
|
-
const { id: n, value: r, onChange: o, FieldLayout: a, defaultCountry: c, validation: l } = D(), [i, u] = $(null), m = (P = (
|
|
148
|
+
var S, P;
|
|
149
|
+
const { id: n, value: r, onChange: o, FieldLayout: a, defaultCountry: c, validation: l } = D(), [i, u] = $(null), m = (P = (S = l == null ? void 0 : l.string) == null ? void 0 : S.phoneOptions) == null ? void 0 : P.allowedCountryCodes, C = Ze(), d = j(() => Qe(C, m), [
|
|
150
150
|
C,
|
|
151
151
|
m
|
|
152
152
|
]), p = j(() => d.map((T) => T.shortCountryCode), [
|
|
153
153
|
d
|
|
154
|
-
]), { currentValue: f, selectedCountryCode: y, handlePhoneChange:
|
|
154
|
+
]), { currentValue: f, selectedCountryCode: y, handlePhoneChange: L, handleCountryCodeChange: N } = Je({
|
|
155
155
|
value: r,
|
|
156
156
|
defaultCountryCode: c,
|
|
157
157
|
allowedCountryCodes: p,
|
|
158
158
|
onChange: o
|
|
159
|
-
}), B = h(e, s.Label), R = h(e, s.Control), x = h(e, s.Description), M = h(e, s.Error),
|
|
159
|
+
}), B = h(e, s.Label), R = h(e, s.Control), x = h(e, s.Description), M = h(e, s.Error), v = {
|
|
160
160
|
currentValue: f,
|
|
161
161
|
selectedCountryCode: y,
|
|
162
|
-
handlePhoneChange:
|
|
162
|
+
handlePhoneChange: L,
|
|
163
163
|
handleCountryCodeChange: N,
|
|
164
164
|
countryCodes: p,
|
|
165
165
|
countries: d,
|
|
166
166
|
popoverContainer: i
|
|
167
167
|
};
|
|
168
168
|
return /* @__PURE__ */ t.createElement(se.Provider, {
|
|
169
|
-
value:
|
|
169
|
+
value: v
|
|
170
170
|
}, /* @__PURE__ */ t.createElement(a, {
|
|
171
171
|
fieldId: n,
|
|
172
172
|
renderLabel: () => B,
|
|
@@ -251,7 +251,7 @@ const b = ({ children: e, className: n, "aria-label": r, placement: o, offset: a
|
|
|
251
251
|
renderEmptyState: l ? () => l : void 0
|
|
252
252
|
}, o.map((u) => {
|
|
253
253
|
const m = G(u.longCountryCode) || "";
|
|
254
|
-
return
|
|
254
|
+
return I(a, {
|
|
255
255
|
key: u.shortCountryCode,
|
|
256
256
|
countryCode: u.shortCountryCode,
|
|
257
257
|
dialingCode: m,
|
|
@@ -264,7 +264,7 @@ const b = ({ children: e, className: n, "aria-label": r, placement: o, offset: a
|
|
|
264
264
|
const d = o.find((p) => p.shortCountryCode === C.key);
|
|
265
265
|
return !!d && We(d, m);
|
|
266
266
|
}
|
|
267
|
-
}, r ?
|
|
267
|
+
}, r ? I(c, {
|
|
268
268
|
autoFocus: !1
|
|
269
269
|
}) : c, i) : i;
|
|
270
270
|
};
|
|
@@ -358,17 +358,18 @@ const rt = ({ className: e }) => {
|
|
|
358
358
|
isOpen: f,
|
|
359
359
|
allowsEmptyCollection: !0,
|
|
360
360
|
onOpenChange: o ? void 0 : m
|
|
361
|
-
}, h(e, s.CountryButton),
|
|
361
|
+
}, h(e, s.CountryButton), I(h(e, s.CountryOptions.Popover), {
|
|
362
362
|
...r,
|
|
363
363
|
isOpen: f
|
|
364
364
|
}));
|
|
365
365
|
}, st = ({ children: e, ...n }) => {
|
|
366
366
|
const r = n;
|
|
367
|
-
return /* @__PURE__ */ t.createElement(we, null, h(e, s.CountryButton),
|
|
367
|
+
return /* @__PURE__ */ t.createElement(we, null, h(e, s.CountryButton), I(h(e, s.CountryOptions.Modal), r));
|
|
368
368
|
}, ct = ({ children: e, className: n }) => {
|
|
369
|
-
const r = F(null), o = F(null), a = F(!1), { id: c, disabled: l, hasError: i, showFlag: u, onFocus: m, onBlur: C } = D(), d = $e(C), { countries: p } = _(), f = h(e, s.CountryDrawer), y = h(e, s.CountryPopover),
|
|
369
|
+
const r = F(null), o = F(null), a = F(!1), { id: c, disabled: l, hasError: i, showFlag: u, onFocus: m, onBlur: C } = D(), d = $e(C), { countries: p } = _(), f = h(e, s.CountryDrawer), y = h(e, s.CountryPopover), L = h(e, s.PhoneNumber), N = p.length > 1, B = Ae(c) && !!y && N, R = typeof n == "function" ? ({ isHovered: v, isFocusWithin: S }) => n({
|
|
370
370
|
hasCountryOptions: N,
|
|
371
|
-
isHovered:
|
|
371
|
+
isHovered: v,
|
|
372
|
+
isFocusWithin: S
|
|
372
373
|
}) : n, x = {
|
|
373
374
|
triggerRef: r,
|
|
374
375
|
optionsRef: o,
|
|
@@ -377,10 +378,10 @@ const rt = ({ className: e }) => {
|
|
|
377
378
|
onFocus: () => {
|
|
378
379
|
a.current || (a.current = !0, m == null || m());
|
|
379
380
|
},
|
|
380
|
-
onBlur: (
|
|
381
|
+
onBlur: (v) => {
|
|
381
382
|
var P, T;
|
|
382
|
-
const
|
|
383
|
-
!((P = r.current) != null && P.contains(
|
|
383
|
+
const S = v.relatedTarget;
|
|
384
|
+
!((P = r.current) != null && P.contains(S)) && !((T = o.current) != null && T.contains(S)) && (a.current = !1, d());
|
|
384
385
|
}
|
|
385
386
|
};
|
|
386
387
|
return p.length === 1 ? /* @__PURE__ */ t.createElement(q, {
|
|
@@ -391,13 +392,13 @@ const rt = ({ className: e }) => {
|
|
|
391
392
|
...M
|
|
392
393
|
}, u && /* @__PURE__ */ t.createElement(Y, {
|
|
393
394
|
longCountryCode: p[0].longCountryCode
|
|
394
|
-
}),
|
|
395
|
+
}), L) : /* @__PURE__ */ t.createElement(q, {
|
|
395
396
|
ref: r,
|
|
396
397
|
className: R,
|
|
397
398
|
isDisabled: l,
|
|
398
399
|
isInvalid: i,
|
|
399
400
|
...M
|
|
400
|
-
}, !B &&
|
|
401
|
+
}, !B && I(f, x), I(y, x), L);
|
|
401
402
|
};
|
|
402
403
|
s.Label = Me;
|
|
403
404
|
s.Control = ct;
|
|
@@ -478,9 +479,7 @@ const lt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
478
479
|
}, /* @__PURE__ */ t.createElement(s.Label.Required, {
|
|
479
480
|
className: g(ge, O.requiredMark)
|
|
480
481
|
})), /* @__PURE__ */ t.createElement(s.Control, {
|
|
481
|
-
className: ({ hasCountryOptions: m,
|
|
482
|
-
isHovered: C
|
|
483
|
-
}) : g(be, O.input, E.control)
|
|
482
|
+
className: ({ hasCountryOptions: m, ...C }) => m ? n(C) : g(be, O.input, E.control)
|
|
484
483
|
}, /* @__PURE__ */ t.createElement(s.CountryDrawer, null, /* @__PURE__ */ t.createElement(s.CountryButton, {
|
|
485
484
|
className: g(E.countryButton, E.drawerButton)
|
|
486
485
|
}, i), /* @__PURE__ */ t.createElement(s.CountryOptions.Modal, {
|