@wix/form-elements 1.137.0 → 1.139.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-DETLNlLb.js → appointment-rac-DuePBZgo.js} +52 -52
- package/dist/component/{bookings-address-rac-ZLK-g-4b.js → bookings-address-rac-CAn2qFUw.js} +1 -1
- package/dist/component/{bookings-email-rac-C-406Pj1.js → bookings-email-rac-CoLqyLjz.js} +1 -1
- package/dist/component/{bookings-first-name-rac-ClxJPAU2.js → bookings-first-name-rac-Cq6PU-R9.js} +1 -1
- package/dist/component/{bookings-header-rac-B_xKyowA.js → bookings-header-rac-BD4UKDvX.js} +1 -1
- package/dist/component/{bookings-last-name-rac-DcExtGsO.js → bookings-last-name-rac-CW58kF1V.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-B5Gpk-kG.js → bookings-login-bar-rac-BIIQO2-8.js} +4 -4
- package/dist/component/{bookings-phone-rac-DJSSDoRL.js → bookings-phone-rac-BBW_3MB5.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-D-v6z1Fs.js → bookings-rich-text-rac-DqOdJVKp.js} +1 -1
- package/dist/component/{checkbox-field-rac-DJmjpsmU.js → checkbox-field-rac-DFze3E2t.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-C4A_Kv1U.js → checkbox-group-field-headless-CDtZ_-0W.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-M1l5h3ii.js → checkbox-group-field-rac-DzEcQbPe.js} +4 -4
- package/dist/component/{checkbox-group-rac-DRdzHVfR.js → checkbox-group-rac-DI3AkgV3.js} +1 -1
- package/dist/component/{checkbox-rac-Cyhg2Wvd.js → checkbox-rac-_p3FcSft.js} +1 -1
- package/dist/component/{contacts-address-rac-BQvrTPCI.js → contacts-address-rac-Cd4261XE.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DIMg-UlR.js → contacts-birthdate-rac-BhxK_mbX.js} +1 -1
- package/dist/component/{contacts-company-rac-OgWSVsmZ.js → contacts-company-rac-CHTJD7i2.js} +1 -1
- package/dist/component/{contacts-email-rac-39IQYxTe.js → contacts-email-rac-SI0iGK76.js} +1 -1
- package/dist/component/{contacts-first-name-rac-CjwVQGS7.js → contacts-first-name-rac-BxVPha6t.js} +1 -1
- package/dist/component/{contacts-last-name-rac-C6ftvjMG.js → contacts-last-name-rac-D87q7e3T.js} +1 -1
- package/dist/component/{contacts-phone-rac-ldsxrFQH.js → contacts-phone-rac-8tRoTrbD.js} +1 -1
- package/dist/component/{contacts-position-rac-3RzQeh2P.js → contacts-position-rac-B6mEnhoG.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-CfuH705u.js → contacts-subscribe-rac-CJLIRb2W.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-D85Dm5Pa.js → contacts-tax-id-rac-CsZOGTdP.js} +1 -1
- package/dist/component/{date-availability-DcYOAszO.js → date-availability-OUSMC6ZJ.js} +1 -1
- package/dist/component/{date-input-field-rac-D4cr7NGI.js → date-input-field-rac-owOqsl-X.js} +6 -6
- package/dist/component/{date-input-rac-BwJwmoZr.js → date-input-rac-Tw6adIZA.js} +1 -1
- package/dist/component/{date-picker-field-rac-C-IM7SHk.js → date-picker-field-rac-CicYutrB.js} +5 -5
- package/dist/component/{date-picker-rac-BkAp8Bgb.js → date-picker-rac-BeQHs3VF.js} +1 -1
- package/dist/component/{date-time-input-field-rac-DGCd-WUh.js → date-time-input-field-rac-DliY_8-g.js} +20 -20
- package/dist/component/{date-time-input-rac-ClLzxACj.js → date-time-input-rac-Dv4_Q0NX.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-DI26D3eR.js → dext-checkbox-group-rac-DQE9ZD9R.js} +2 -2
- package/dist/component/{dext-checkbox-rac-CRJq1RxN.js → dext-checkbox-rac-DVM1OTE6.js} +1 -1
- package/dist/component/{dext-date-picker-rac-CvzQs_Te.js → dext-date-picker-rac-C58i2ohz.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-Dtysjtim.js → dext-date-time-input-rac-DfuOVj7h.js} +1 -1
- package/dist/component/{dext-dropdown-rac-DHGo26Az.js → dext-dropdown-rac-ClkT-JZS.js} +1 -1
- package/dist/component/{dext-email-rac-BpnNEdVF.js → dext-email-rac-5kXpIx4T.js} +1 -1
- package/dist/component/{dext-number-input-rac-C5iW_ei6.js → dext-number-input-rac-ZRSlts_C.js} +1 -1
- package/dist/component/{dext-phone-rac-KCTWlcaK.js → dext-phone-rac-nWQzy-Gq.js} +1 -1
- package/dist/component/{dext-radio-group-rac-ad6j8I4s.js → dext-radio-group-rac-CiayGIL_.js} +2 -2
- package/dist/component/{dext-rating-input-rac-B4AvCMi0.js → dext-rating-input-rac-CL4JR2hi.js} +1 -1
- package/dist/component/{dext-tags-rac-BMathc_H.js → dext-tags-rac-BS5gmpIc.js} +2 -2
- package/dist/component/{dext-text-area-rac-Xb-pGhSZ.js → dext-text-area-rac-ZQ0u3sgJ.js} +1 -1
- package/dist/component/{dext-text-input-rac-CSE8qfGF.js → dext-text-input-rac-CBN-B60v.js} +1 -1
- package/dist/component/{dext-url-input-rac-Bq4iz5z9.js → dext-url-input-rac-CL7yBfpu.js} +1 -1
- package/dist/component/{donation-rac-DRUbysCr.js → donation-rac-BCxI8DUn.js} +17 -17
- package/dist/component/{dropdown-field-headless-DO592qOP.js → dropdown-field-headless-Cfnoh3TT.js} +5 -5
- package/dist/component/{dropdown-field-rac-C2yjQI-C.js → dropdown-field-rac-C5kP9Maj.js} +6 -6
- package/dist/component/{dropdown-rac-DlrGt2kE.js → dropdown-rac-Q6QwHrpQ.js} +1 -1
- package/dist/component/{ecom-address-rac-D_StW_li.js → ecom-address-rac-Bcpnkrsz.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-CrdttyUU.js → ecom-subscription-checkbox-rac-BaiPwmST.js} +2 -2
- package/dist/component/{email-input-field-rac-DqXazwV3.js → email-input-field-rac-CTb93XO1.js} +3 -3
- package/dist/component/{events-repeater-rac-DDpRs7rY.js → events-repeater-rac-SUxGn4_x.js} +13 -13
- package/dist/component/{events-rsvp-rac-BN9axMYX.js → events-rsvp-rac-DlPaip2O.js} +8 -8
- package/dist/component/{field-error-headless-JU1yiTVE.js → field-error-headless-CxjXRFrW.js} +1 -1
- package/dist/component/{field-label-headless-CD4_8Ros.js → field-label-headless-DCEOZ-YZ.js} +1 -1
- package/dist/component/{file-upload-rac-CQTx6hEf.js → file-upload-rac-BXQ0aFc0.js} +21 -21
- package/dist/component/{fixed-payment-rac-B5cRBcxY.js → fixed-payment-rac-ByeJsO05.js} +21 -21
- package/dist/component/{form-Mla9_phC.js → form-maUFPJM6.js} +1682 -1678
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-B_F66ChH.js → header-field-rac-N9L0MPac.js} +2 -2
- package/dist/component/{header-rac-BX6Df8ej.js → header-rac-C2hqJW8B.js} +1 -1
- package/dist/component/{image-choice-rac-Ce01EhFJ.js → image-choice-rac-EnNAFefv.js} +17 -17
- package/dist/component/{index-Ch7II1GU.js → index-CoJjnTGV.js} +2 -2
- package/dist/component/{index-DoIW9Cb6.js → index-D29khrM1.js} +4 -4
- package/dist/component/{isObjectLike-C1TnJWn6.js → isObjectLike-CThwpoQB.js} +1 -1
- package/dist/component/{multiline-address-field-rac-DVDEcHtq.js → multiline-address-field-rac-C-zlqFCi.js} +7 -7
- package/dist/component/{multiline-address-rac-BJ8ln_G5.js → multiline-address-rac-CY468N1Y.js} +1 -1
- package/dist/component/{number-input-field-rac-DTfx9YgL.js → number-input-field-rac-CV63nd7z.js} +10 -10
- package/dist/component/{number-input-rac-pg7cmYpS.js → number-input-rac-q6pBGhwp.js} +1 -1
- package/dist/component/{password-rac-D8BKTB_H.js → password-rac-D4v01lEX.js} +10 -10
- package/dist/component/{payment-input-rac-HBquclKy.js → payment-input-rac-BOUE_ySy.js} +14 -14
- package/dist/component/{phone-input-field-rac-Fgfg5HwA.js → phone-input-field-rac-CTihyY5b.js} +26 -26
- package/dist/component/{phone-rac-pivMTIyc.js → phone-rac-DAis236h.js} +1 -1
- package/dist/component/{product-list-rac-DauIxK2R.js → product-list-rac-F8_l5GI1.js} +22 -22
- package/dist/component/{quiz-radio-group-rac-B0OtjxKf.js → quiz-radio-group-rac-DE9GqBot.js} +1 -1
- package/dist/component/{radio-button-module-classes-Cu3KM625.js → radio-button-module-classes-BEFH9dYx.js} +3 -3
- package/dist/component/{radio-group-field-rac-0dJHtf3G.js → radio-group-field-rac-D306MV8M.js} +6 -6
- package/dist/component/{radio-group-rac-CqtO1JqM.js → radio-group-rac-BBXf4sUC.js} +1 -1
- package/dist/component/{rating-input-field-rac-CMny6OSF.js → rating-input-field-rac-CmdfvIwe.js} +11 -11
- package/dist/component/{rating-input-rac-DA4iU_-m.js → rating-input-rac-qEzE8Cfn.js} +1 -1
- package/dist/component/{rich-content-rac.module-CZX0cZst.js → rich-content-rac.module-DQehNlZs.js} +1 -1
- package/dist/component/{rich-text-field-rac-Dtm6xFcj.js → rich-text-field-rac-DdrwnOCw.js} +2 -2
- package/dist/component/{rich-text-rac-ClqIW5ds.js → rich-text-rac-Borne4AS.js} +1 -1
- package/dist/component/{service-dropdown-rac-_4T1OZGq.js → service-dropdown-rac-X8o6CdQN.js} +9 -9
- package/dist/component/{services-multi-choice-rac-BVim-jnM.js → services-multi-choice-rac-CSSpMeF6.js} +7 -7
- package/dist/component/{signature-rac-D7w8WTLO.js → signature-rac-CQjh5yhj.js} +4 -4
- package/dist/component/{submit-button-rac-BkUDj1dU.js → submit-button-rac-Cqr19tEe.js} +2 -2
- package/dist/component/{tags-field-rac-Di1aK4E2.js → tags-field-rac-CZk0JVp2.js} +5 -5
- package/dist/component/{tags-rac-CJ5f4Doi.js → tags-rac-81GiW9Gk.js} +1 -1
- package/dist/component/{text-area-field-rac-DFjrT9fs.js → text-area-field-rac-dAU0uni_.js} +6 -6
- package/dist/component/{text-area-rac-DBANidv_.js → text-area-rac-bI1leJhM.js} +1 -1
- package/dist/component/{text-input-field-rac-DJDzqR6d.js → text-input-field-rac-fghTXZQD.js} +3 -3
- package/dist/component/{text-input-headless-CG4wbxMG.js → text-input-headless-Cj6oVNcr.js} +3 -3
- package/dist/component/{text-input-rac-V0tK1Gj2.js → text-input-rac-CyYiyp8N.js} +1 -1
- package/dist/component/{time-input-rac-LSoyg8Ao.js → time-input-rac-Dub-iiot.js} +4 -4
- package/dist/component/{url-input-field-rac-DI0SdDI0.js → url-input-field-rac-C7Nn--xk.js} +8 -8
- package/dist/component/{url-input-rac-obx2Uf2F.js → url-input-rac-Dp6j47Uq.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-BM-NiVtO.js → use-dropdown-option-class-name-C3lcgxqr.js} +2 -2
- package/dist/component/{use-dropdown-trigger-class-name-BHwQ-wZa.js → use-dropdown-trigger-class-name-DWusXXCi.js} +2 -2
- package/dist/component/{use-element-state-class-name-DAYz5X_i.js → use-element-state-class-name-1oBaNXtu.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-DZ-4NGpv.js → use-hoverable-input-class-name-C3mtdo6O.js} +2 -2
- package/dist/component/{use-service-options-base-BOjt2sg9.js → use-service-options-base-DHpjXrGd.js} +1 -1
- package/dist/component/use-text-input-class-name-BXn7PNlp.js +6 -0
- package/dist/form.d.ts +1 -1
- package/package.json +2 -2
- package/dist/component/use-text-input-class-name-Bqj4OoIw.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 { bj as u, aX as i, aW as C, aZ as R, aw as T, ae as d } from "./form-
|
|
4
|
-
import { u as g, R as p, s as S, T as h } from "./rich-content-rac.module-
|
|
3
|
+
import { bj as u, aX as i, aW as C, aZ as R, aw as T, ae as d } from "./form-maUFPJM6.js";
|
|
4
|
+
import { u as g, R as p, s as S, T as h } from "./rich-content-rac.module-DQehNlZs.js";
|
|
5
5
|
const y = ({ truncate: t = !0 } = {}) => {
|
|
6
6
|
const { content: a, maxShownParagraphs: s } = u(), n = e.useMemo(() => ({
|
|
7
7
|
colorPalette: R(),
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import e, { useMemo as
|
|
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 I from "classnames";
|
|
4
|
-
import { bj as b, bg as x, bl as P, bc as B,
|
|
5
|
-
import { CheckboxGroup as
|
|
4
|
+
import { bj as b, bg as x, bl as P, bc as B, N as q, Y as U, I as w, K, G as V, u as Y, J as j, f } from "./form-maUFPJM6.js";
|
|
5
|
+
import { CheckboxGroup as z, CheckboxField as J, CheckboxButton as Q } from "react-aria-components";
|
|
6
6
|
import { f as m, a as F } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { L as $, g as W } from "./field-label-headless-
|
|
8
|
-
import { D as X, E as Z } from "./field-error-headless-
|
|
7
|
+
import { L as $, g as W } from "./field-label-headless-DCEOZ-YZ.js";
|
|
8
|
+
import { D as X, E as Z } from "./field-error-headless-CxjXRFrW.js";
|
|
9
9
|
import { F as ee } from "./fieldset-headless-CD3fds9J.js";
|
|
10
10
|
import { E as te } from "./error-icon-hZxQ6DEy.js";
|
|
11
11
|
import { s as O } from "./field-rac.module-DfEb7pBp.js";
|
|
12
|
-
import { u as oe } from "./use-element-state-class-name-
|
|
12
|
+
import { u as oe } from "./use-element-state-class-name-1oBaNXtu.js";
|
|
13
13
|
const o = ({ children: t, className: n }) => {
|
|
14
|
-
const { id: s, value: a, onChange: i, disabled: l, readOnly: r, required: c, onBlur: u, 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),
|
|
14
|
+
const { id: s, value: a, onChange: i, disabled: l, readOnly: r, required: c, onBlur: u, 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
|
-
]), v = T((
|
|
17
|
-
i == null || i(
|
|
16
|
+
]), v = T((y) => {
|
|
17
|
+
i == null || i(y);
|
|
18
18
|
}, [
|
|
19
19
|
i
|
|
20
20
|
]);
|
|
@@ -28,17 +28,17 @@ const o = ({ children: t, className: n }) => {
|
|
|
28
28
|
required: c,
|
|
29
29
|
onBlur: u,
|
|
30
30
|
onFocus: p
|
|
31
|
-
}, /* @__PURE__ */ e.createElement(
|
|
31
|
+
}, /* @__PURE__ */ e.createElement(z, {
|
|
32
32
|
className: n,
|
|
33
33
|
"aria-labelledby": _,
|
|
34
|
-
value:
|
|
34
|
+
value: M,
|
|
35
35
|
onChange: v,
|
|
36
36
|
isDisabled: l,
|
|
37
37
|
isReadOnly: r,
|
|
38
38
|
isRequired: c,
|
|
39
39
|
isInvalid: C
|
|
40
40
|
}, A)),
|
|
41
|
-
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null,
|
|
41
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, h, D)
|
|
42
42
|
});
|
|
43
43
|
}, N = ({ children: t, className: n }) => {
|
|
44
44
|
const { id: s, options: a, numberOfColumns: i } = b(), l = m(t, N.Option);
|
|
@@ -86,7 +86,7 @@ const o = ({ children: t, className: n }) => {
|
|
|
86
86
|
}));
|
|
87
87
|
}, l);
|
|
88
88
|
const C = m(t, E.Input), L = m(t, E.Image), g = m(t, E.Label);
|
|
89
|
-
return /* @__PURE__ */ e.createElement(
|
|
89
|
+
return /* @__PURE__ */ e.createElement(J, {
|
|
90
90
|
value: a.label,
|
|
91
91
|
isDisabled: r,
|
|
92
92
|
isReadOnly: c,
|
|
@@ -127,7 +127,7 @@ const le = "_options_9rde9_1", ie = "_optionInput_9rde9_33", re = "_option_9rde9
|
|
|
127
127
|
hover: d.optionHover
|
|
128
128
|
}, Ie = () => {
|
|
129
129
|
const t = oe({
|
|
130
|
-
globalClasses:
|
|
130
|
+
globalClasses: j,
|
|
131
131
|
moduleClasses: ue
|
|
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, {
|
|
@@ -141,13 +141,13 @@ const le = "_options_9rde9_1", ie = "_optionInput_9rde9_33", re = "_option_9rde9
|
|
|
141
141
|
}, /* @__PURE__ */ e.createElement(o.Options.Option.Input, {
|
|
142
142
|
className: d.optionInput
|
|
143
143
|
}), /* @__PURE__ */ e.createElement(o.Options.Option.Image, {
|
|
144
|
-
className: I(
|
|
144
|
+
className: I(K, d.optionImage, n)
|
|
145
145
|
}), /* @__PURE__ */ e.createElement(o.Options.Option.Label, {
|
|
146
146
|
className: d.optionLabel
|
|
147
147
|
}))), /* @__PURE__ */ e.createElement(o.Error, {
|
|
148
|
-
className: I(
|
|
148
|
+
className: I(V, O.error)
|
|
149
149
|
}, /* @__PURE__ */ e.createElement(te, null), /* @__PURE__ */ e.createElement(o.Error.Text, null)), /* @__PURE__ */ e.createElement(o.Description, {
|
|
150
|
-
className: I(
|
|
150
|
+
className: I(Y, O.description)
|
|
151
151
|
}, Ee));
|
|
152
152
|
}, De = () => /* @__PURE__ */ e.createElement(Ie, null);
|
|
153
153
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b2 as n } from "./form-
|
|
2
|
-
import { A as S, a as p, C as N, ax as g, aO as q, aP as D, b4 as L } from "./form-
|
|
1
|
+
import { b2 as n } from "./form-maUFPJM6.js";
|
|
2
|
+
import { A as S, a as p, C as N, ax as g, aO as q, aP as D, b4 as L } from "./form-maUFPJM6.js";
|
|
3
3
|
const l = (e = !1) => ({
|
|
4
4
|
country: {
|
|
5
5
|
required: e
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { e as R, aE as _, aT as de, aF as O, ak as Ge, B as Be, ay as qe, ar as He, aq as A, az as Ee, aI as re, aC as Fe, c as B, as as M, b3 as Te, au as je, at as he, av as q } from "./form-
|
|
2
|
-
import { a_ as Mn } from "./form-
|
|
1
|
+
import { e as R, aE as _, aT as de, aF as O, ak as Ge, B as Be, ay as qe, ar as He, aq as A, az as Ee, aI as re, aC as Fe, c as B, as as M, b3 as Te, au as je, at as he, av as q } from "./form-maUFPJM6.js";
|
|
2
|
+
import { a_ as Mn } from "./form-maUFPJM6.js";
|
|
3
3
|
import ke from "ajv";
|
|
4
4
|
import Xe 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-OUSMC6ZJ.js";
|
|
10
|
+
import { a as Sn } from "./date-availability-OUSMC6ZJ.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,21 @@ import { RicosViewer as X } from "@wix/ricos/viewer";
|
|
|
2
2
|
import L from "classnames";
|
|
3
3
|
import r, { useMemo as q, 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 { be as ft, d as yt, b9 as _t, bb as Ct, aO as Tt, aP as wt, aH as Mt, aN as W, F as K, bt as _e, b2 as lt, bj as _, bg as T, bl as ae, bf as It, aT as qt, C as Oe, b0 as xt, b4 as Bt, bq as kt, bk as $t, bp as Vt, b7 as Ut, aY as Wt, b6 as Kt, bm as Yt, an as Ht,
|
|
5
|
+
import { be as ft, d as yt, b9 as _t, bb as Ct, aO as Tt, aP as wt, aH as Mt, aN as W, F as K, bt as _e, b2 as lt, bj as _, bg as T, bl as ae, bf as It, aT as qt, C as Oe, b0 as xt, b4 as Bt, bq as kt, bk as $t, bp as Vt, b7 as Ut, aY as Wt, b6 as Kt, bm as Yt, an as Ht, N as z, Y as Q, O as ge, G as Z, u as ee } from "./form-maUFPJM6.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 Gt, u as Xt } from "./use-dropdown-trigger-class-name-
|
|
8
|
+
import { a as Gt, u as Xt } from "./use-dropdown-trigger-class-name-DWusXXCi.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-CxjXRFrW.js";
|
|
11
|
+
import { L as de } from "./field-label-headless-DCEOZ-YZ.js";
|
|
12
|
+
import { e as zt, c as Qt, a as Zt, r as gt } from "./isObjectLike-CThwpoQB.js";
|
|
13
|
+
import { V as en, u as tn } from "./use-dropdown-option-class-name-C3lcgxqr.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
18
|
import { s as I } from "./field-rac.module-DfEb7pBp.js";
|
|
19
|
-
import { u as rn } from "./use-text-input-class-name-
|
|
19
|
+
import { u as rn } from "./use-text-input-class-name-BXn7PNlp.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-DTfx9YgL.js → number-input-field-rac-CV63nd7z.js}
RENAMED
|
@@ -2,18 +2,18 @@ import { RicosViewer as P } from "@wix/ricos/viewer";
|
|
|
2
2
|
import i from "classnames";
|
|
3
3
|
import r, { useState as j, useCallback as G, useEffect as Q, useRef as U } from "react";
|
|
4
4
|
import { NumberField as Y, Input as $ } from "react-aria-components";
|
|
5
|
-
import { bj as _, bg as S, bt as z, bl as H,
|
|
5
|
+
import { bj as _, bg as S, bt as z, bl as H, N as J, Y as K, G as W, u as X } from "./form-maUFPJM6.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-CxjXRFrW.js";
|
|
8
|
+
import { L as ee } from "./field-label-headless-DCEOZ-YZ.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
12
|
import { s as d } from "./field-rac.module-DfEb7pBp.js";
|
|
13
|
-
import { u as se } from "./use-text-input-class-name-
|
|
13
|
+
import { u as se } from "./use-text-input-class-name-BXn7PNlp.js";
|
|
14
14
|
const e = ({ children: t }) => {
|
|
15
15
|
var F, L, R;
|
|
16
|
-
const { id: a, value: s, onChange: l, disabled: p, required: b, readOnly: o, onBlur: E, onFocus: f, FieldLayout: m, hasError: u, validation: n } = _(), { labelId: g } = S(), D = ((F = n == null ? void 0 : n.number) == null ? void 0 : F.multipleOf) || 1, y = (L = n == null ? void 0 : n.number) == null ? void 0 : L.maximum, A = (R = n == null ? void 0 : n.number) == null ? void 0 : R.minimum, x = O(s), [
|
|
16
|
+
const { id: a, value: s, onChange: l, disabled: p, required: b, readOnly: o, onBlur: E, onFocus: f, FieldLayout: m, hasError: u, validation: n } = _(), { labelId: g } = S(), D = ((F = n == null ? void 0 : n.number) == null ? void 0 : F.multipleOf) || 1, y = (L = n == null ? void 0 : n.number) == null ? void 0 : L.maximum, A = (R = n == null ? void 0 : n.number) == null ? void 0 : R.minimum, x = O(s), [T, I] = j(x), V = ne(E), h = c(t, e.Label), q = c(t, e.Input), M = c(t, e.Description), k = c(t, e.Error), B = G((N) => {
|
|
17
17
|
if (N === void 0 || Number.isNaN(N)) {
|
|
18
18
|
l(""), I(NaN);
|
|
19
19
|
return;
|
|
@@ -30,21 +30,21 @@ const e = ({ children: t }) => {
|
|
|
30
30
|
s
|
|
31
31
|
]), /* @__PURE__ */ r.createElement(m, {
|
|
32
32
|
fieldId: a,
|
|
33
|
-
renderLabel: () =>
|
|
33
|
+
renderLabel: () => h,
|
|
34
34
|
renderInput: () => /* @__PURE__ */ r.createElement(Y, {
|
|
35
35
|
"aria-labelledby": g,
|
|
36
|
-
value:
|
|
36
|
+
value: T,
|
|
37
37
|
onChange: B,
|
|
38
38
|
isDisabled: p,
|
|
39
39
|
isRequired: b,
|
|
40
40
|
isReadOnly: o,
|
|
41
41
|
isInvalid: u,
|
|
42
|
-
onBlur:
|
|
42
|
+
onBlur: V,
|
|
43
43
|
onFocus: f,
|
|
44
44
|
minValue: A ?? void 0,
|
|
45
45
|
maxValue: y ?? void 0
|
|
46
|
-
},
|
|
47
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, k,
|
|
46
|
+
}, q),
|
|
47
|
+
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, k, M)
|
|
48
48
|
});
|
|
49
49
|
}, le = ({ className: t }) => {
|
|
50
50
|
var u;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import e, { useState as
|
|
1
|
+
import e, { useState as h, useRef as S } from "react";
|
|
2
2
|
import { RicosViewer as x } from "@wix/ricos/viewer";
|
|
3
3
|
import d from "classnames";
|
|
4
|
-
import { bj as E, bg as I, bl as O, bt as A,
|
|
5
|
-
import { TextField as
|
|
4
|
+
import { bj as E, bg as I, bl as O, bt as A, N as B, Y as V, G as v, u as P } from "./form-maUFPJM6.js";
|
|
5
|
+
import { TextField as M, Group as k, Input as q, Button as j } from "react-aria-components";
|
|
6
6
|
import { f as u, a as b } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as U, E as G } from "./field-error-headless-
|
|
8
|
-
import { L as H } from "./field-label-headless-
|
|
7
|
+
import { D as U, E as G } from "./field-error-headless-CxjXRFrW.js";
|
|
8
|
+
import { L as H } from "./field-label-headless-DCEOZ-YZ.js";
|
|
9
9
|
import { E as W } from "./error-icon-hZxQ6DEy.js";
|
|
10
10
|
import { H as Z } from "./custom-focus-class-_483Pkwp.js";
|
|
11
11
|
import { s as p } from "./field-rac.module-DfEb7pBp.js";
|
|
12
|
-
import { u as Q } from "./use-text-input-class-name-
|
|
12
|
+
import { u as Q } from "./use-text-input-class-name-BXn7PNlp.js";
|
|
13
13
|
const t = ({ children: o, className: r }) => {
|
|
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] =
|
|
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] = h(!1), F = u(o, t.Label), L = u(o, t.Control), T = u(o, t.Description), w = u(o, t.Error);
|
|
15
15
|
return /* @__PURE__ */ e.createElement(_, {
|
|
16
16
|
fieldId: l,
|
|
17
17
|
renderLabel: () => F,
|
|
18
|
-
renderInput: () => /* @__PURE__ */ e.createElement(
|
|
18
|
+
renderInput: () => /* @__PURE__ */ e.createElement(M, {
|
|
19
19
|
"aria-labelledby": y,
|
|
20
20
|
value: s ?? "",
|
|
21
21
|
onChange: c,
|
|
@@ -28,7 +28,7 @@ const t = ({ children: o, className: r }) => {
|
|
|
28
28
|
className: r
|
|
29
29
|
}, b(L, {
|
|
30
30
|
isVisible: R,
|
|
31
|
-
onToggleVisibility: () => D((
|
|
31
|
+
onToggleVisibility: () => D((N) => !N)
|
|
32
32
|
})),
|
|
33
33
|
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, T, w)
|
|
34
34
|
});
|
|
@@ -134,7 +134,7 @@ const J = (o) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
134
134
|
}, ({ isVisible: l }) => l ? /* @__PURE__ */ e.createElement(K, null) : /* @__PURE__ */ e.createElement(J, null))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
135
135
|
className: d(v, p.error)
|
|
136
136
|
}, /* @__PURE__ */ e.createElement(W, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
137
|
-
className: d(
|
|
137
|
+
className: d(P, p.description)
|
|
138
138
|
}, te));
|
|
139
139
|
}, be = () => /* @__PURE__ */ e.createElement(oe, null);
|
|
140
140
|
export {
|
|
@@ -2,16 +2,16 @@ import r, { useCallback as P, useRef as Q } from "react";
|
|
|
2
2
|
import { RicosViewer as Y } from "@wix/ricos/viewer";
|
|
3
3
|
import p from "classnames";
|
|
4
4
|
import { TextField as w, Group as z, Input as J } from "react-aria-components";
|
|
5
|
-
import { bj as R, bg as D, bb as T, bt as K, bl as W,
|
|
5
|
+
import { bj as R, bg as D, bb as T, bt as K, bl as W, N as X, Y as Z, G as ee, u as re } from "./form-maUFPJM6.js";
|
|
6
6
|
import { f as u } 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-
|
|
9
|
-
import { f as
|
|
7
|
+
import { D as te, E as ne } from "./field-error-headless-CxjXRFrW.js";
|
|
8
|
+
import { L as ae } from "./field-label-headless-DCEOZ-YZ.js";
|
|
9
|
+
import { f as L, 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
13
|
import { s as d } from "./field-rac.module-DfEb7pBp.js";
|
|
14
|
-
import { u as ue } from "./use-text-input-class-name-
|
|
14
|
+
import { u as ue } from "./use-text-input-class-name-BXn7PNlp.js";
|
|
15
15
|
function ie(e, t) {
|
|
16
16
|
return {
|
|
17
17
|
productId: e.id,
|
|
@@ -27,12 +27,12 @@ function h(e) {
|
|
|
27
27
|
}
|
|
28
28
|
const n = ({ children: e }) => {
|
|
29
29
|
var O, g, A, V;
|
|
30
|
-
const { id: t, value: a, onChange: s, disabled: i, readOnly: m, required: I, hasError: y, onBlur: o, onFocus: E, FieldLayout:
|
|
30
|
+
const { id: t, value: a, onChange: s, disabled: i, readOnly: m, required: I, hasError: y, onBlur: o, onFocus: E, FieldLayout: G, validation: C } = R(), { labelId: M, prefixId: q } = D(), { regionalFormat: c } = T(), S = (A = (g = (O = C == null ? void 0 : C.predefined) == null ? void 0 : O.paymentOptions) == null ? void 0 : g.products) == null ? void 0 : A[0], _ = (V = a == null ? void 0 : a.at(0)) == null ? void 0 : V.price, [F, b] = oe({
|
|
31
31
|
sourceValue: _,
|
|
32
|
-
format: (l) =>
|
|
32
|
+
format: (l) => L(String(l ?? ""), c),
|
|
33
33
|
regionalFormat: c
|
|
34
34
|
}), $ = P(() => {
|
|
35
|
-
const l =
|
|
35
|
+
const l = L(F, c);
|
|
36
36
|
b(l || ""), o == null || o();
|
|
37
37
|
}, [
|
|
38
38
|
F,
|
|
@@ -41,14 +41,14 @@ const n = ({ children: e }) => {
|
|
|
41
41
|
b
|
|
42
42
|
]), B = P((l) => {
|
|
43
43
|
b(l);
|
|
44
|
-
const
|
|
45
|
-
if (
|
|
46
|
-
if (
|
|
44
|
+
const N = h(L(l, c)), j = h(_);
|
|
45
|
+
if (N !== j) {
|
|
46
|
+
if (N === void 0) {
|
|
47
47
|
s(null);
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
50
|
s([
|
|
51
|
-
ie(S,
|
|
51
|
+
ie(S, N)
|
|
52
52
|
]);
|
|
53
53
|
}
|
|
54
54
|
}, [
|
|
@@ -58,11 +58,11 @@ const n = ({ children: e }) => {
|
|
|
58
58
|
_,
|
|
59
59
|
b
|
|
60
60
|
]), U = u(e, n.Label), k = u(e, n.Input), v = u(e, n.Description), H = u(e, n.Error);
|
|
61
|
-
return /* @__PURE__ */ r.createElement(
|
|
61
|
+
return /* @__PURE__ */ r.createElement(G, {
|
|
62
62
|
fieldId: t,
|
|
63
63
|
renderLabel: () => U,
|
|
64
64
|
renderInput: () => /* @__PURE__ */ r.createElement(w, {
|
|
65
|
-
"aria-labelledby": `${
|
|
65
|
+
"aria-labelledby": `${M} ${q}`,
|
|
66
66
|
value: a ? F : "",
|
|
67
67
|
onChange: B,
|
|
68
68
|
isDisabled: i,
|
package/dist/component/{phone-input-field-rac-Fgfg5HwA.js → phone-input-field-rac-CTihyY5b.js}
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { RicosViewer as Ce } from "@wix/ricos/viewer";
|
|
2
2
|
import h 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 G, useId as de } from "react";
|
|
4
|
-
import { b2 as ye, bt as w, bb as te, bs as Ee, bj as D, bg as ne, bl as fe,
|
|
4
|
+
import { b2 as ye, bt as w, bb as te, bs as Ee, bj as D, bg as ne, bl as fe, N as ge, Y as he, M as be, O as Oe, G as Ne, u as _e } from "./form-maUFPJM6.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
7
|
import { f as g, a as I } from "./find-child-C60k4CxG.js";
|
|
8
|
-
import { D as Re, E as xe } from "./field-error-headless-
|
|
9
|
-
import { L as Me } from "./field-label-headless-
|
|
8
|
+
import { D as Re, E as xe } from "./field-error-headless-CxjXRFrW.js";
|
|
9
|
+
import { L as Me } from "./field-label-headless-DCEOZ-YZ.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-DWusXXCi.js";
|
|
13
|
+
import { V as Ue, u as Ve } from "./use-dropdown-option-class-name-C3lcgxqr.js";
|
|
14
14
|
import ae, { AsYouType as qe, isValidPhoneNumber as Ge, isSupportedCountry as Ye } from "libphonenumber-js";
|
|
15
15
|
import "libphonenumber-js/metadata.min.json";
|
|
16
16
|
import { C as Q } from "./calling-country-codes-PyWuOTmF.js";
|
|
@@ -18,7 +18,7 @@ import { C as He } from "./chevron-down-icon-CcpVm6B-.js";
|
|
|
18
18
|
import { E as ze } from "./error-icon-hZxQ6DEy.js";
|
|
19
19
|
import { H as W } from "./custom-focus-class-_483Pkwp.js";
|
|
20
20
|
import { s as O } from "./field-rac.module-DfEb7pBp.js";
|
|
21
|
-
import { u as Ke } from "./use-text-input-class-name-
|
|
21
|
+
import { u as Ke } from "./use-text-input-class-name-BXn7PNlp.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,8 +99,8 @@ function Je({ value: e, defaultCountryCode: n, allowedCountryCodes: r, onChange:
|
|
|
99
99
|
}
|
|
100
100
|
const f = J(p);
|
|
101
101
|
u((y) => {
|
|
102
|
-
const L = f || y || ((r == null ? void 0 : r.length) === 1 ? r[0] : void 0),
|
|
103
|
-
return l.current =
|
|
102
|
+
const L = f || y || ((r == null ? void 0 : r.length) === 1 ? r[0] : void 0), _ = U(X(p, L));
|
|
103
|
+
return l.current = _ ?? "", o(_), f || y;
|
|
104
104
|
});
|
|
105
105
|
}, [
|
|
106
106
|
r,
|
|
@@ -120,7 +120,7 @@ function Je({ value: e, defaultCountryCode: n, allowedCountryCodes: r, onChange:
|
|
|
120
120
|
handleCountryCodeChange: d
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
|
-
const se = /* @__PURE__ */ ee(null),
|
|
123
|
+
const se = /* @__PURE__ */ ee(null), N = () => {
|
|
124
124
|
const e = G(se);
|
|
125
125
|
if (!e)
|
|
126
126
|
throw new Error("Phone input components must be used within PhoneInput component");
|
|
@@ -151,7 +151,7 @@ const se = /* @__PURE__ */ ee(null), _ = () => {
|
|
|
151
151
|
m
|
|
152
152
|
]), p = j(() => d.map((T) => T.shortCountryCode), [
|
|
153
153
|
d
|
|
154
|
-
]), { currentValue: f, selectedCountryCode: y, handlePhoneChange: L, handleCountryCodeChange:
|
|
154
|
+
]), { currentValue: f, selectedCountryCode: y, handlePhoneChange: L, handleCountryCodeChange: _ } = Je({
|
|
155
155
|
value: r,
|
|
156
156
|
defaultCountryCode: c,
|
|
157
157
|
allowedCountryCodes: p,
|
|
@@ -160,7 +160,7 @@ const se = /* @__PURE__ */ ee(null), _ = () => {
|
|
|
160
160
|
currentValue: f,
|
|
161
161
|
selectedCountryCode: y,
|
|
162
162
|
handlePhoneChange: L,
|
|
163
|
-
handleCountryCodeChange:
|
|
163
|
+
handleCountryCodeChange: _,
|
|
164
164
|
countryCodes: p,
|
|
165
165
|
countries: d,
|
|
166
166
|
popoverContainer: i
|
|
@@ -179,7 +179,7 @@ const se = /* @__PURE__ */ ee(null), _ = () => {
|
|
|
179
179
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, M, x)
|
|
180
180
|
}));
|
|
181
181
|
}, K = ({ children: e, className: n }) => {
|
|
182
|
-
const { labelId: r } = ne(), { hasError: o, disabled: a, readOnly: c } = D(), { t: l } = w(), { selectedCountryCode: i, countries: u } =
|
|
182
|
+
const { labelId: r } = ne(), { hasError: o, disabled: a, readOnly: c } = D(), { t: l } = w(), { selectedCountryCode: i, countries: u } = N(), m = de(), C = i ? u.find((y) => y.shortCountryCode === i) : void 0, d = C && Y(C.longCountryCode) || "", p = l("field.phone.country-code.aria-label"), f = C ? `${p}, ${C.countryName}, ${d}` : p;
|
|
183
183
|
return /* @__PURE__ */ t.createElement(je, {
|
|
184
184
|
isDisabled: a || c,
|
|
185
185
|
id: m,
|
|
@@ -189,13 +189,13 @@ const se = /* @__PURE__ */ ee(null), _ = () => {
|
|
|
189
189
|
"data-invalid": o || void 0
|
|
190
190
|
}, e);
|
|
191
191
|
}, Xe = ({ className: e }) => {
|
|
192
|
-
const { selectedCountryCode: n, countries: r } =
|
|
192
|
+
const { selectedCountryCode: n, countries: r } = N(), o = r.find((a) => a.shortCountryCode === n);
|
|
193
193
|
return o ? /* @__PURE__ */ t.createElement(z, {
|
|
194
194
|
className: e,
|
|
195
195
|
longCountryCode: o.longCountryCode
|
|
196
196
|
}) : null;
|
|
197
197
|
}, et = ({ children: e, className: n }) => {
|
|
198
|
-
const { selectedCountryCode: r, countries: o } =
|
|
198
|
+
const { selectedCountryCode: r, countries: o } = N();
|
|
199
199
|
return o.some((c) => c.shortCountryCode === r) ? null : /* @__PURE__ */ t.createElement("span", {
|
|
200
200
|
className: n
|
|
201
201
|
}, e);
|
|
@@ -203,7 +203,7 @@ const se = /* @__PURE__ */ ee(null), _ = () => {
|
|
|
203
203
|
K.Flag = Xe;
|
|
204
204
|
K.EmptyState = et;
|
|
205
205
|
const b = ({ children: e, className: n, "aria-label": r, placement: o, offset: a, ...c }) => {
|
|
206
|
-
const { triggerRef: l, optionsRef: i, isForcedOpen: u, isOpen: m } = c, { popoverContainer: C } =
|
|
206
|
+
const { triggerRef: l, optionsRef: i, isForcedOpen: u, isOpen: m } = c, { popoverContainer: C } = N(), d = g(e, b.Search);
|
|
207
207
|
if (!m)
|
|
208
208
|
return null;
|
|
209
209
|
const p = /* @__PURE__ */ t.createElement(le, {
|
|
@@ -222,7 +222,7 @@ const b = ({ children: e, className: n, "aria-label": r, placement: o, offset: a
|
|
|
222
222
|
"aria-label": r
|
|
223
223
|
}, p) : p));
|
|
224
224
|
}, tt = ({ children: e, className: n, overlayClassName: r, "aria-label": o, portalContainer: a = t.Fragment, ...c }) => {
|
|
225
|
-
const { optionsRef: l } = c, { selectedCountryCode: i, handleCountryCodeChange: u } =
|
|
225
|
+
const { optionsRef: l } = c, { selectedCountryCode: i, handleCountryCodeChange: u } = N(), m = G(Le);
|
|
226
226
|
return /* @__PURE__ */ t.createElement(Ie, {
|
|
227
227
|
className: r,
|
|
228
228
|
isDismissable: !0
|
|
@@ -245,7 +245,7 @@ const b = ({ children: e, className: n, "aria-label": r, placement: o, offset: a
|
|
|
245
245
|
}
|
|
246
246
|
}, e)))));
|
|
247
247
|
}, le = ({ children: e, listBoxProps: n, isForcedOpen: r }) => {
|
|
248
|
-
const { countries: o } =
|
|
248
|
+
const { countries: o } = N(), a = g(e, b.Option), c = g(e, b.Search), l = g(e, b.EmptyState), i = /* @__PURE__ */ t.createElement(Ue, {
|
|
249
249
|
isForcedOpen: r === !0,
|
|
250
250
|
...n,
|
|
251
251
|
renderEmptyState: l ? () => l : void 0
|
|
@@ -324,7 +324,7 @@ A.Name = me;
|
|
|
324
324
|
A.Code = pe;
|
|
325
325
|
b.Option = A;
|
|
326
326
|
const rt = ({ className: e }) => {
|
|
327
|
-
const { t: n } = w(), { inputId: r, ariaDescribedBy: o } = ne(), { id: a, placeholder: c, disabled: l, readOnly: i, required: u, label: m, hasError: C } = D(), { currentValue: d, handlePhoneChange: p } =
|
|
327
|
+
const { t: n } = w(), { inputId: r, ariaDescribedBy: o } = ne(), { id: a, placeholder: c, disabled: l, readOnly: i, required: u, label: m, hasError: C } = D(), { currentValue: d, handlePhoneChange: p } = N(), f = F(null);
|
|
328
328
|
return fe(() => {
|
|
329
329
|
var y;
|
|
330
330
|
(y = f.current) == null || y.focus({
|
|
@@ -346,7 +346,7 @@ const rt = ({ className: e }) => {
|
|
|
346
346
|
className: e
|
|
347
347
|
});
|
|
348
348
|
}, at = ({ children: e, ...n }) => {
|
|
349
|
-
const r = n, { isForcedOpen: o } = r, { disabled: a, readOnly: c, required: l, hasError: i } = D(), [u, m] = $(!1), { t: C } = w(), { selectedCountryCode: d, handleCountryCodeChange: p } =
|
|
349
|
+
const r = n, { isForcedOpen: o } = r, { disabled: a, readOnly: c, required: l, hasError: i } = D(), [u, m] = $(!1), { t: C } = w(), { selectedCountryCode: d, handleCountryCodeChange: p } = N(), f = o || u && !a && !c;
|
|
350
350
|
return /* @__PURE__ */ t.createElement(De, {
|
|
351
351
|
"aria-label": C("field.phone.country-code.aria-label"),
|
|
352
352
|
value: d ?? null,
|
|
@@ -366,8 +366,8 @@ const rt = ({ className: e }) => {
|
|
|
366
366
|
const r = n;
|
|
367
367
|
return /* @__PURE__ */ t.createElement(we, null, g(e, s.CountryButton), I(g(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 } =
|
|
370
|
-
hasCountryOptions:
|
|
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 } = N(), f = g(e, s.CountryDrawer), y = g(e, s.CountryPopover), L = g(e, s.PhoneNumber), _ = p.length > 1, B = Ae(c) && !!y && _, R = typeof n == "function" ? ({ isHovered: v, isFocusWithin: S }) => n({
|
|
370
|
+
hasCountryOptions: _,
|
|
371
371
|
isHovered: v,
|
|
372
372
|
isFocusWithin: S
|
|
373
373
|
}) : n, x = {
|
|
@@ -429,7 +429,7 @@ const lt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
429
429
|
}, /* @__PURE__ */ t.createElement("path", {
|
|
430
430
|
fillRule: "evenodd",
|
|
431
431
|
d: "M6.6108,14.3887 C5.5718,13.3497 4.9998,11.9687 4.9998,10.4997 C4.9998,9.0317 5.5718,7.6507 6.6108,6.6117 C7.6498,5.5727 9.0308,4.9997 10.4998,4.9997 C11.9688,4.9997 13.3498,5.5727 14.3888,6.6117 C15.4278,7.6507 15.9998,9.0317 15.9998,10.4997 C15.9998,11.9687 15.4278,13.3497 14.3888,14.3887 C13.3498,15.4277 11.9688,15.9997 10.4998,15.9997 C9.0308,15.9997 7.6498,15.4277 6.6108,14.3887 L6.6108,14.3887 Z M20.0028,19.2957 L15.4328,14.7247 C16.4438,13.5477 16.9998,12.0687 16.9998,10.4997 C16.9998,8.7637 16.3238,7.1317 15.0958,5.9047 C13.8688,4.6767 12.2358,3.9997 10.4998,3.9997 C8.7638,3.9997 7.1318,4.6767 5.9038,5.9047 C4.6758,7.1317 3.9998,8.7637 3.9998,10.4997 C3.9998,12.2367 4.6758,13.8677 5.9038,15.0957 C7.1318,16.3237 8.7638,16.9997 10.4998,16.9997 C12.0688,16.9997 13.5478,16.4437 14.7258,15.4317 L19.2958,20.0027 L20.0028,19.2957 Z"
|
|
432
|
-
})), it = "_control_o9wij_1", mt = "_countryButton_o9wij_9", pt = "_drawerButton_o9wij_25", Ct = "_popoverButton_o9wij_34", dt = "_chevron_o9wij_39", yt = "_globeIcon_o9wij_48", Et = "_searchIcon_o9wij_56", ft = "_flag_o9wij_61", gt = "_option_o9wij_67", ht = "_phoneNumber_o9wij_80", bt = "_countryOptions_o9wij_106", Ot = "_countrySearch_o9wij_123",
|
|
432
|
+
})), it = "_control_o9wij_1", mt = "_countryButton_o9wij_9", pt = "_drawerButton_o9wij_25", Ct = "_popoverButton_o9wij_34", dt = "_chevron_o9wij_39", yt = "_globeIcon_o9wij_48", Et = "_searchIcon_o9wij_56", ft = "_flag_o9wij_61", gt = "_option_o9wij_67", ht = "_phoneNumber_o9wij_80", bt = "_countryOptions_o9wij_106", Ot = "_countrySearch_o9wij_123", Nt = "_mobileDrawer_o9wij_131", _t = "_name_o9wij_140", St = "_code_o9wij_144", Lt = "_mobileOverlay_o9wij_161", E = {
|
|
433
433
|
control: it,
|
|
434
434
|
countryButton: mt,
|
|
435
435
|
drawerButton: pt,
|
|
@@ -442,8 +442,8 @@ const lt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
442
442
|
phoneNumber: ht,
|
|
443
443
|
countryOptions: bt,
|
|
444
444
|
countrySearch: Ot,
|
|
445
|
-
mobileDrawer:
|
|
446
|
-
name:
|
|
445
|
+
mobileDrawer: Nt,
|
|
446
|
+
name: _t,
|
|
447
447
|
code: St,
|
|
448
448
|
mobileOverlay: Lt
|
|
449
449
|
}, It = ({ content: e, locale: n }) => /* @__PURE__ */ t.createElement(Ce, {
|
|
@@ -497,9 +497,9 @@ const lt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
497
497
|
}, c, l, u)), /* @__PURE__ */ t.createElement(s.PhoneNumber, {
|
|
498
498
|
className: h(O.innerInput, E.phoneNumber)
|
|
499
499
|
})), /* @__PURE__ */ t.createElement(s.Error, {
|
|
500
|
-
className: h(
|
|
500
|
+
className: h(Ne, O.error)
|
|
501
501
|
}, /* @__PURE__ */ t.createElement(ze, null), /* @__PURE__ */ t.createElement(s.Error.Text, null)), /* @__PURE__ */ t.createElement(s.Description, {
|
|
502
|
-
className: h(
|
|
502
|
+
className: h(_e, O.description)
|
|
503
503
|
}, It));
|
|
504
504
|
};
|
|
505
505
|
export {
|